User Tools

Site Tools


git:best_practices

This is an old revision of the document!


GIT - Best Practices

  • Commit often
  • All is not Lost
    git log -g
    git fsck –unreachable
    git stash list
  • Backups
    • Although a clone is a backup it does not include git configs, working directory/index, non-standard refs, or dangling objects.|

</code>

  • 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.1479726769.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki