Created
August 31, 2011 20:29
-
-
Save bsodmike/1184632 to your computer and use it in GitHub Desktop.
Git Workflow for Working with Shared Branches
This file contains 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
#Workflow | |
git co development | |
git pull | |
git co -b todays_work // create new temp working branch | |
...do some work... | |
git commit | |
git co development | |
git pull ----- (remote changes come in) | |
### inspect all changes ### | |
git co todays_work | |
git rebase development | |
git co development | |
git merge todays_work (there is no merge here, just what is called a fast forward) | |
git push | |
git branch -D todays_work // delete the temp working branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Handy git commands:
git ci -m "descriptive commit"
&git stash save descriptive comment here
// this will temporarily place any 'dirty' changes into the stash.// you can switch branches and pop the stashed commit by doing
git stash pop
git revert [SHA]
// great for undoing, creates a new commit reverting changes in whatever SHA.git reset --hard [SHA]
// reset all the way back to the specified commit.git rebase -i HEAD~x
// include the -p flag if you want to retain valuable merge commits.