Difference between revisions of "Developer Guide - Git Workflows"

From bering-uClibc
Jump to: navigation, search
(Created initial skeleton)
 
(Add Separate changes paragraph)
Line 1: Line 1:
= Description =
+
== Description ==
This document attempts to write down and motivate some of the workflow elements used for managing the development of Bering-uClibc with git.
+
This document attempts to write down and motivate some of the workflow elements used for managing the development of Bering-uClibc with git. This guide was an adapted version of the [http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html GitWorkflows] document that is used for the git project.
 +
 
 +
== Separate changes ==
 +
As a general rule, you should try to split your changes into small logical steps, and commit each of them. They should be consistent, working independently of any later commits, pass the build, etc. This makes the review process much easier, and the history much more useful for later inspection and analysis, for example with [http://www.kernel.org/pub/software/scm/git/docs/git-blame.html git-blame(1)] and [http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html git-bisect(1)].
 +
 
 +
To achieve this, try to split your work into small steps from the very beginning. It is always easier to squash a few commits together than to split one big commit into several. Don’t be afraid of making too small or imperfect steps along the way. You can always go back later and edit the commits with <tt>git rebase --interactive</tt> before you publish them. You can use <tt>git stash save --keep-index</tt> to try a build independent of other uncommitted changes; see the EXAMPLES section of [http://www.kernel.org/pub/software/scm/git/docs/git-stash git-stash(1)].
  
 
[[Category:Developer Guide]]
 
[[Category:Developer Guide]]

Revision as of 11:00, 17 August 2012

Description

This document attempts to write down and motivate some of the workflow elements used for managing the development of Bering-uClibc with git. This guide was an adapted version of the GitWorkflows document that is used for the git project.

Separate changes

As a general rule, you should try to split your changes into small logical steps, and commit each of them. They should be consistent, working independently of any later commits, pass the build, etc. This makes the review process much easier, and the history much more useful for later inspection and analysis, for example with git-blame(1) and git-bisect(1).

To achieve this, try to split your work into small steps from the very beginning. It is always easier to squash a few commits together than to split one big commit into several. Don’t be afraid of making too small or imperfect steps along the way. You can always go back later and edit the commits with git rebase --interactive before you publish them. You can use git stash save --keep-index to try a build independent of other uncommitted changes; see the EXAMPLES section of git-stash(1).