Created
June 24, 2010 18:10
-
-
Save apinstein/451740 to your computer and use it in GitHub Desktop.
Git Workflow
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
After a lot of different workflows, we've finally settled on this workflow for using git internally. It offers several benefits and avoid a bunch of pitfalls we were running into. It isn't perfect for everyone, of course, but it's worked very well for us. | |
Benefits: | |
- Makes it easy to share a topic branch among multiple developers without lots of conflicts and rebase hell. | |
- Preserves logical history of "started working on topic at this point, merged it into master at this point). | |
- Still allows for frequent rebasing against master to ensure you stay up-to-date with the mainline. | |
---> master | |
+---> topic-integration (shared across users via github) | |
+----> topic-devA (local branch in devA's repo) | |
+----> topic-devB (local branch in devB's repo) | |
* ONLY merge into topic-integration (both from master and topic-dev*) | |
* NEVER rebase topic-integration (since it's shared, this caused hell for people relying on it) | |
* topic-dev* can (and should be) frequently rebased against topic-integration | |
* topic-ingegration can (and should) frequently merge in master | |
* When ready to merge the topic into master, merge it into master: | |
git co topic-integration | |
git merge master | |
git co master | |
git merge topic-integration | |
NOTE: | |
* it seems to be a smell for rebasing problems if you're rebasing against 2 different upstreams... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment