Slide 1

Slide 1 text

tell a story with your repository

Slide 2

Slide 2 text

$ git config -l user.name = Tomasz Kowalczyk user.twitter = tmmx user.github = thunderer

Slide 3

Slide 3 text

Story?

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

«narrative»

Slide 12

Slide 12 text

meaningful commit messages

Slide 13

Slide 13 text

“bugfix” “fixed bug #1337” “minor changes” “review fixes” “working on it” “update” “fixtures” “fixed tests” “enhancements” “YOLO”

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

“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”

Slide 16

Slide 16 text

short description (empty line) longer story about the changeset which explains its purpose

Slide 17

Slide 17 text

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.

Slide 18

Slide 18 text

stopwritingramblingcommitmessages.com

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

descriptive branch names

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

linear repository history

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

git bisect

Slide 27

Slide 27 text

rebase everything

Slide 28

Slide 28 text

git pull

Slide 29

Slide 29 text

git pull --rebase

Slide 30

Slide 30 text

explicit merges (--no-ff)

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

squash... ...sometimes

Slide 33

Slide 33 text

tags for milestones

Slide 34

Slide 34 text

technology

Slide 35

Slide 35 text

project management software integration

Slide 36

Slide 36 text

large files

Slide 37

Slide 37 text

build artifacts

Slide 38

Slide 38 text

signed commits

Slide 39

Slide 39 text

.gitattributes

Slide 40

Slide 40 text

.gitignore

Slide 41

Slide 41 text

git obliterate git filter-branch BFG Repo-Cleaner

Slide 42

Slide 42 text

git worktree

Slide 43

Slide 43 text

shallow clones

Slide 44

Slide 44 text

why is this important

Slide 45

Slide 45 text

improved employee onboarding

Slide 46

Slide 46 text

documentation right next to the code

Slide 47

Slide 47 text

care about your tools

Slide 48

Slide 48 text

work out your own best practices...

Slide 49

Slide 49 text

...but whatever you do, be consistent

Slide 50

Slide 50 text

git show questions?

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

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