Ubuntu - GIT - Best Practices

  1. Commit often
  2. All is not Lost
    • git log -g
    • git fsck –unreachable
    • git stash list
  3. Backups
    • Although a clone is a backup it does not include git configs, working directory/index, non-standard refs, or dangling objects.
  4. Once you push, don't change history.
  5. Choose a Workflow
  6. Logically divide into repositories
  7. Useful commit messages
  8. Stay up to date
    • Rebasing
    • git pull –rebase
    • git merge –no-ff
  9. Maintenance <code>
    • git fsck
    • git gc –aggressive
    • git remote update –prune
    • git stash list
  10. Enforce standards
    • Regression tests
    • Complication tests
    • Syntax/link checkers
    • Commit message analysis
  11. Useful Tools
    • gitolite
    • gitslave
    • gerrit
  12. Integrate with external tools
  13. Always name your stashes
  14. Protect against history rewriting