git remote -v
git remote add upstream https://git.enlightenment.org/enlightenment/efl.git
git fetch upstream
git checkout master
git stash
git rebase upstream/master
At this stage you check that commits what will be merged by typing git status
. If you don’t want to rewrite the history of your master branch, (for example because other people may have cloned it) then you should replace the last command with git merge upstream/master
.
Instead of the rebase command, you can use the following:
git merge --no-ff upstream/master
This way your commits aren’t on top anymore.
upstream/master
you may need to force the push in order to push it to your own forked repository on GitHub. You’d do that with:git push -f origin master
You only need to use the -f
the first time after you’ve rebased.
git stash pop