Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   gitworkflows    ( 7 )

обзор рекомендуемых рабочих процессов с Git (An overview of recommended workflows with Git)

  Name  |  Synopsis  |  Description  |    Separate changes    |  Managing branches  |  Distributed workflows  |  See also  |

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 test suite, 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 push --keep-index to run the test suite independent of other uncommitted changes; see the EXAMPLES section of git-stash(1).