Page History
...
- On the master branch do:
- git pull
- On the working branch do:
- git rebase master (you can use -i option if you want to edit the list of changes)
Sometimes you might have multiple commits on your working branch. Each commit gets pushed into gerrit as a separate review. When synchronizing with the tip of the remote repo, you'd want to rebase each of the commits. I do so in the following steps:
- checkout the earliest commit into its separate temporary branch
- git checkout -b <temp branch> <commit-id>
- go to master and update it to the tip of the remote repo as shown above (using 'git pull')
- rebase the temp branch to master. On the temp branch do
- git rebase master (you can use -i option if you want to edit the list of changes)
- rebase the temp branch on your working branch (as shown above).
- git rebase -i <temp branch> <working branch>
- ensure to remove the commit of the temp branch from the commit list displayed by rebase.
- git rebase -i <temp branch> <working branch>
Overview
Content Tools