kdsch.org · about · rss

2023 May 10

Take advantage of Git

Git is awesome, but delivers most of its value when used beyond the utter basics.

Write multi-line commit messages

I’ve seen some codebases that make me wonder if the developers know that git commit -m isn’t the only way to commit changes. Some changes are too complex to summarize in one line.

I never use -m anyway because I want to heed the commit message style guidelines, and my editor helps me do that.

Store docs with code

I think teams have bad reasons to avoid this.

Use branches for parallel versions

I’ve seen some teams creating new versions of something by creating a new repository and copying files into it. If you use the same repository and create a new branch, your job is done.

Minimize diff noise

Clean diffs are easier to summarize.

It’s not a bucket

A Git repository isn’t a place where you dump stuff. It’s a way to version and distribute important information. Treating it as a sack for your disorganized bits and bobs will cause pain in the future.


Feedback

Discuss and submit patches for this page by emailing my public inbox. Please note the etiquette guidelines.

© 2023 Karl Schultheisz — source