Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




A quick vocab review

Let's look at
wordsImage Modified



What is a remote?

Related imageImage Modified


Where do branches live?

local vs. origin vs. your local copy of origin

we're localImage Modified 



What's the difference between "origin/my-branch" and "origin mybranch"?`

spaceImage Modified



What are integration branches?

integrationImage Modified


The Seven Golden Rules of git hygiene

  1. Thou shalt make a new branch off latest master for every ticket.
  2. Thou shalt include a ticket ID in every branch name and every commit.
  3. Thou shalt always PR.
  4. Thou shalt always review thy Files Changed.
  5. Thou shalt never merge thy own Pull Requests.
  6. Thou shalt delete thy merged branches.
  7. Thy branches shall be short-lived.

...

1. Thou shalt make a new branch for every ticket.

Make very sure your local copy of master is up-to-date with origin before branching!

1 ticket = 1 branch: Don't mix work from different issues.

...

And you care about line lengths, grammar, punctuation, and other inane details, then Read Chris Beam's How to Write a Git Commit Message and follow The seven rules of a great commit message.Also for the retentive folks: Always delete (non-integration) branches from GitHub after PR merge.