Created
August 2, 2010 16:00
-
-
Save philikon/504847 to your computer and use it in GitHub Desktop.
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
# Start a new chapter by branching the current branch off: | |
(branch chapter5)$ git checkout -b chapter6 | |
# Make some commits: | |
(branch chapter6)$ git commit | |
(branch chapter6)$ git commit | |
# Oh noez, chapter 3 needs a bugfix | |
(branch chapter6)$ git checkout chapter3 | |
(branch chapter3)$ git commit -m "Bugfix" | |
# Rebase all later chapters on chapter 3. | |
(branch chapter3)$ git checkout chapter4 | |
(branch chapter4)$ git rebase chapter3 | |
(branch chapter4)$ git checkout chapter5 | |
(branch chapter5)$ git rebase chapter4 | |
# Oh noez, rebasing chapter5 on chapter4 got us a conflict in file 'foo.py'. | |
# First resolve manually, then continue rebasing. | |
(branch chapter5)$ emacs foo.py | |
(branch chapter5)$ git add foo.py | |
(branch chapter5)$ git rebase --continue | |
# Continue rebasing newer chapters | |
(branch chapter5)$ git checkout chapter6 | |
(branch chapter6)$ git rebase chapter5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment