Created
June 11, 2013 13:39
-
-
Save rymawby/5756909 to your computer and use it in GitHub Desktop.
Git rebasing basics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pull often and rebase often | |
| # branch | |
| git checkout -b branch_name | |
| # finished working on small piece of work | |
| git add . | |
| git commit -m 'Commit message' | |
| git push origin branch_name | |
| # pull to check if anything changed - switch to branch | |
| git checkout branch_to_rebase | |
| git pull | |
| git checkout branch_name | |
| # rebase changes | |
| git rebase branch_to_rebase # or whatever |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see current branch
$ git branch
...
rebase preferring current branch changes merge during conflicts
$ git rebase -Xtheirs branch-b
to avoid massive conflicts from rebasing branch-b, I would use this to user current branch-a to overwrite branch-b
is that okay ?