git:best_practices
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
git:best_practices [2016/11/21 11:13] – peter | git:best_practices [2019/11/29 14:53] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== GIT - Best Practices ====== | ||
- | |||
- | - Commit often | ||
- | - All is not Lost <code bash> | ||
- | git log -g | ||
- | git fsck –unreachable | ||
- | git stash list | ||
- | </ | ||
- | - Backups | ||
- | * Although a clone is a backup it does not include git configs, working directory/ | ||
- | - Once you push, don't change history. | ||
- | - Choose a Workflow | ||
- | - Logically divide into repositories | ||
- | - Useful commit messages | ||
- | - Stay up to date | ||
- | * Rebasing < | ||
- | git pull –rebase | ||
- | git merge –no-ff | ||
- | </ | ||
- | - Maintenance < | ||
- | git fsck | ||
- | git gc –aggressive | ||
- | git remote update –prune | ||
- | git stash list | ||
- | </ | ||
- | - Enforce standards | ||
- | * Regression tests | ||
- | * Complication tests | ||
- | * Syntax/link checkers | ||
- | * Commit message analysis | ||
- | - Useful Tools | ||
- | * gitolite | ||
- | * gitslave | ||
- | * gerrit | ||
- | - Integrate with external tools | ||
- | - Always name your stashes | ||
- | - Protect against history rewriting | ||
- | |||
git/best_practices.1479726829.txt.gz · Last modified: 2020/07/15 09:30 (external edit)