* branch master -> FETCH_HEAD 1

* branch master -> FETCH_HEAD

git checkout master
git reset --hard upstream/master
git push --force

Here is what the above code is Doing:
1. git remote add upstream https://github.com/whoever/whatever.git
This adds a new remote named upstream.

2. git fetch upstream
This fetches any new changes from the original, “upstream” repository.

3. git checkout master
This makes sure you’re on your local master branch.

4. git reset –hard upstream/master
This resets your local master branch to match the upstream branch.

5. git push –force
This pushes your local changes to your own GitHub repository.

Similar Posts