Created
January 24, 2013 17:15
-
-
Save calebhearth/4625280 to your computer and use it in GitHub Desktop.
Switch back and forth between directories and git branches, and even merge the last branch you were on, with hyphen!
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
~/ | |
↪ cd code/project | |
project[master]/ | |
↪ cd - | |
~/ | |
↪ cd code/project | |
project[master]/ | |
↪ git checkout -b feature-branch | |
project[feature-branch]/ | |
↪ git checkout - | |
project[master]/ | |
↪ git checkout - | |
project[feature-branch]/ | |
↪ vim app/models/user.rb | |
project[feature-branch]/ | |
↪ git commit -am "quick fix" | |
# of course there's a pull-request/code review here | |
project[feature-branch]/ | |
↪ git rebase master | |
project[feature-branch]/ | |
↪ git checkout master | |
project[master]/ | |
↪ git merge - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment