considering:
- https://github.com/whoever/whatever.git is the address of original repo
- https://github.com/youraccount/whatever.git is the address of fork repo
clone your fork if you haven't cloned already
$ git clone https://github.com/youraccount/whatever.git
add original repo as upstream if you haven't done already
git remote add upstream https://github.com/whoever/whatever.git
fetching upstream
git fetch upstream
confirm you are in master branch
git checkout master
merge local
git merge upstream/master
push merge
git push origin master
Sometimes you prefer to perform a full reset of your fork the following instructions will erase all modifications from your fork and sync it with original repo !!! note that any modification in your fork will be lost !!!
add upstream as before if not yet
git remote add upstream /url/to/original/repo
fetching upstream
git fetch upstream
confirm you are in master branch
git checkout master
hard reseting your local repo from upstream be careful! This command you override everything locally!
git reset --hard upstream/master
pushing local repo to remote fork !!! note that this command will override any change in remote fork with local repo!!!
git push origin master --force