Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tell a story with your (git) repository

Tell a story with your (git) repository

Repository history is often overlooked as a tool to keep information about project development process. You can change that by following several rules.


Tomasz Kowalczyk

September 15, 2016


  1. tell a story with your repository

  2. $ git config -l user.name = Tomasz Kowalczyk user.twitter =

    tmmx user.github = thunderer
  3. Story?

  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. «narrative»

  12. meaningful commit messages

  13. “bugfix” “fixed bug #1337” “minor changes” “review fixes” “working on

    it” “update” “fixtures” “fixed tests” “enhancements” “YOLO”
  14. None
  15. “installation script fails without mbstring, added sanity check before executing

    command” “[ISSUE-12] redirect to user profile after finished setup” “added JSON serialization handler for article entity, fixes #1337”
  16. short description (empty line) longer story about the changeset which

    explains its purpose
  17. added extensions sanity check before installation installation script requires mbstring

    extension to correctly process fixtures inserted in the database. we should detect its presence so the data is not malformed and installation is not corrupted.
  18. stopwritingramblingcommitmessages.com

  19. None
  20. descriptive branch names

  21. “new-tests” “issue-1337” “bugfix” “temporary-dev” “refactoring-2”

  22. None
  23. “issue1337-new-payment-form” “replace-serialization-library” “bug-invalid-profile-redirect” “php7-migration”

  24. linear repository history

  25. None
  26. git bisect

  27. rebase everything

  28. git pull

  29. git pull --rebase

  30. explicit merges (--no-ff)

  31. None
  32. squash... ...sometimes

  33. tags for milestones

  34. technology

  35. project management software integration

  36. large files

  37. build artifacts

  38. signed commits

  39. .gitattributes

  40. .gitignore

  41. git obliterate git filter-branch BFG Repo-Cleaner

  42. git worktree

  43. shallow clones

  44. why is this important

  45. improved employee onboarding

  46. documentation right next to the code

  47. care about your tools

  48. work out your own best practices...

  49. ...but whatever you do, be consistent

  50. git show questions?

  51. git commit -m “thanks!” Twitter @tmmx GitHub /thunderer

  52. Images: https://www.flickr.com/photos/mattbuck007/3794250164 (trains bg) https://twitter.com/HenryHoffman/status/694184106440200192 (guitar hero) https://xkcd.com/1296 (git history)

    https://xkcd.com/1597 (what is git) https://www.flickr.com/photos/blackroompictures/22583733139 (straight railroad) https://www.flickr.com/photos/genista/2072491605 (rubble) https://www.flickr.com/photos/archer10/5299318419 (acropolis) https://www.flickr.com/photos/jonwestra78/14843670025 (library) https://git-scm.com/downloads/logos (git) https://twitter.com/davrous/status/767013225426620417 (git merge) https://twitter.com/GIFs/status/767968973732196352 (merge conflict) Links: http://stopwritingramblingcommitmessages.com http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html https://www.reddit.com/r/ProgrammerHumor/comments/43ug8t/i_fucked_up_git_so_bad_it_turned_into_guitar_hero
  53. Resources: http://learngitbranching.js.org https://www.reviewboard.org/docs/codebase/dev/git/clean-commits https://news.ycombinator.com/item?id=4130494 (git aliases) https://github.com/erlang/otp/wiki/Writing-good-commit-messages https://zachholman.com/posts/git-commit-history https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs http://chris.beams.io/posts/git-commit

    https://sethrobertson.github.io/GitBestPractices https://github.com/torvalds/subsurface/blob/master/README#L82-109 https://github.com/git/git/commit/b3f1280ec740d8012d18e870a50a5ff76c4e3c42 https://who-t.blogspot.co.at/2009/12/on-commit-messages.html http://developercertificate.org https://git-scm.com/book/en/v2 https://rtyley.github.io/bfg-repo-cleaner https://softwareswirl.blogspot.co.uk/2013/05/git-imerge-practical-introduction.html http://nvie.com/posts/a-successful-git-branching-model http://nuclearsquid.com/writings/git-tricks-tips-workflows https://help.github.com/articles/remove-sensitive-data