Git usage in the dpkg team

Recommandations for handling the [http://en.wikipedia.org/wiki/Git_%28software%29 Git] repository.

URLs

Generic recommendations

First line should be a small summary

* src/file.c (foo): Made the foo() function check bla to avoid stuff.
* src/other.c: Fixed usage of foo() to match the previous change.

How to release

For translators

If the git push fails, redo the command git fetch && git rebase origin/master and try again. Note that git rebase can be interrupted if there's a conflict between your work and the changes made on the remote repository. In that case, fix the conflicts by editing the conflicted files, then git add <conflicted files> and ask the rebase process to continue with git rebase --continue. Once it's over, git push should work.

<!> Git, as a distributed VCS, allows you to make multiple commits without pushing your changes back, please avoid that if possible. We advise you to not multiply commits uselessly because they clutter the historical log and it's more difficult to see important changes on the code (instead of the translations). If you have multiple commits waiting to be pushed, Git offers you a possibility to "merge" them in a single commit. Proceed as following:

Before:

pick 7ce2b6c Log message of the first commit
pick 2fbd2c4 Log message of the second commit
pick 9d3196a Log message of the third commit

After:

pick 7ce2b6c Log message of the first commit
squash 2fbd2c4 Log message of the second commit
squash 9d3196a Log message of the third commit


EddyP: Wouldn't it be easier to advice translators who want to use several local commits, to use a local branch, and at the end git checkout master && git merge --squash translationbranch instead of the complicated file editing?