Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
git:merge-into-master [2009/07/21 14:23] andrei use git fetch origin before git pull --rebase |
git:merge-into-master [2012/12/11 16:50] (current) oej old revision restored |
||
---|---|---|---|
Line 51: | Line 51: | ||
# if everything is ok and you don't have any rebase conflicts, push the | # if everything is ok and you don't have any rebase conflicts, push the | ||
# changes to the repository master branch | # changes to the repository master branch | ||
- | git push --ff origin my_local_branch: | + | git push origin my_local_branch: |
</ | </ | ||
- | Alternatively you could use a shorter version, by replacing the git fetch and git rebase with git pull --rebase: | + | Alternatively you could use git pull --rebase instead of git rebase: |
< | < | ||
# change to my local branch | # change to my local branch | ||
git checkout my_local_branch | git checkout my_local_branch | ||
+ | git fetch origin | ||
# rebase on the latest origin/ | # rebase on the latest origin/ | ||
git pull --rebase --ff origin master | git pull --rebase --ff origin master | ||
# if everything is ok and you don't have any rebase conflicts, push the | # if everything is ok and you don't have any rebase conflicts, push the | ||
# changes to the repository master branch | # changes to the repository master branch | ||
- | git push --ff origin my_local_branch: | + | git push origin my_local_branch: |
</ | </ |