Permalink
Browse files

Add 'straw man' branching/merging guidelines

  • Loading branch information...
1 parent bfee3a6 commit 5237930d42cd3e53ca172d0a0cf69452a7f89574 @nickstenning nickstenning committed Jul 11, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 git.md
View
14 git.md
@@ -1,4 +1,6 @@
-# Git commit messages
+# Git style guide
+
+## Commit messages
Commit messages should contain:
@@ -11,7 +13,7 @@ Commit messages should contain:
* Leave a blank line before
* Hard-wrap lines at 72 characters
-## Example
+### Example
Taken from [Tim Pope’s guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
@@ -36,3 +38,11 @@ Taken from [Tim Pope’s guidelines](http://tbaggery.com/2008/04/19/a-note-about
single space, with blank lines in between, but conventions vary here
- Use a hanging indent
+
+## Branching/merging conventions
+
+You may often choose to work on a particular feature on a "feature branch" rather than directly on `master`. Indeed, given how cheap branches are in Git, this is [positively encouraged](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging).
+
+You are encouraged to make liberal use of Git's [history rewriting features](http://git-scm.com/book/en/Git-Tools-Rewriting-History) while working locally, in order to arrange your commits into appropriate logical chunks that will make sense to your fellow developers. In particular, you may find `git rebase --interactive` very useful.
+
+When merging from a feature branch to master (or any other mainline development branch), in particular one that has previously been shared with colleagues, you should use `git merge`'s `--no-ff` option to preserve evidence of your feature branch in the repository history. This advice may be freely ignored for smaller local feature branches for which a fast-forward merge will look like any other routine development work on `master`.

0 comments on commit 5237930

Please sign in to comment.