Created
August 16, 2011 09:44
-
-
Save virtualstaticvoid/1148742 to your computer and use it in GitHub Desktop.
Git commands for maintaining a master, development and feature branches
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
| [branch "master"] | |
| mergeoptions = --no-ff --no-commit | |
| [branch "development"] | |
| mergeoptions = --ff-only |
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
| #!/bin/bash | |
| #### | |
| # Git commands for maintaining a master, development and feature branches | |
| # | |
| ## | |
| # start working on a new feature | |
| # from development, or master branch, assuming it is up to date | |
| git checkout -b feature_name | |
| ## | |
| # ... work on feature | |
| git add . | |
| git commit -m "feature sub task..." | |
| ## | |
| # merge to development | |
| # fast forward, so development has all commits | |
| git checkout development | |
| git merge feature_name --ff-only | |
| # merge to master | |
| # creates new commit on master with a message | |
| git checkout master | |
| git merge development -m "feature name added" --no-ff |
Author
You might want to put the .gitconfig file into the project directory, so that other repositories that don't follow the same convention aren't affected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Tried it on the social_connections gem, works fine for me. My
Looks as follows now, which seems to do allow me to not remember the merge options all the time: