Commit Culture
Why clean expressive history matters?
One commit, one idea
Each commit should be as small as possible, but no smaller.
The smallest a commit can be is a single cohesive idea: don't make commits so small that they are meaningless on their own.
There should be a one-to-one mapping between ideas and commits: each commit should build one idea, and each idea should be implemented by one commit.
Turn large commits into small commits by dividing large problems into smaller problems and solving the small problems one at a time.
All of this also makes writing commit messages easier
Why "Why" matters!
Bad:
fix a bug
Just as bad:
Allow dots in usernames
Change the regexps so usernames can have dots
in them.
How it should be done
Allow dots in usernames to support Google and LDAP auth
To prevent nonsense, usernames are currently restricted to A-Z0-9. Now that
we have Google and LDAP auth, a couple of installs want to allow "." too
since they have schemes like "abraham.lincoln@mycompany.com" (see Tnnn). There
are no technical reasons not to do this, so I opened up the regexps a bit.
We could mostly open this up more but I figured I'd wait until someone asks
before allowing "ke$ha", etc., because I personally find such names
distasteful and offensive.
UniMicro examples
Re-reading your own code
is the best way to spot bugs in it
How rebase can bite you in the a*s
If there is time...
How rebase works:
rebase --continue vs. git commit
Commit Culture
By pylinux
Commit Culture
- 737