This shows you the differences between two versions of the page.
collab:git-usage [2012/12/13 09:46] c7031007 created |
collab:git-usage [2018/09/03 19:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Editing and Committing====== | ||
- | Please follow these simple guidelines to help everybody get the most out of revision control: | ||
- | |||
- | * Do not add auto-generated files to the repository. | ||
- | * To help with the previous point, consider adding a ''Makefile'' or scripts for auto-generating files where their making is not obvious. | ||
- | * Use ''.gitignore'' files to keep the workspace clean for ''git status'' and friends. List all auto-generated files, including backup files, in ''.gitignore''. | ||
- | * With each commit, include only a single, self-contained type of change (which will often include changes to multiple files). Keep this change minimal to make it easy to follow edits with ''git log'', ''annotate'', ''diff'' etc. For example, confine content changes and formatting changes to separate commits. | ||
- | * To help with the previous point, it is most useful to use hard linebreaks instead of one-line paragraphs because it makes local changes easier to spot. Take care to alter as few lines as possible; do not reflow paragraphs if your edits affect only isolated lines. If the formatting becomes ugly, commit separate formatting-only edits. | ||
- | * Provide a brief but informative message with each commit. (This should go without saying.) | ||
- | * Do not keep multiple versions of files in the repository. The repository does this automatically for you. |