Three git tidbits that improve my quality-of-life in working on Calamares.

  • (Configuration) No pager. I prefer the output to go to the terminal and stay there. If I need a pager, I’ll pipe to one. This leaves the output of, say, git branch visible afterwards.
    git config --global core.pager cat
    
  • (Configuration) No diff prefixes. This way, git diff produces something that can be applied with patch -p0 (rather than -p1), and when doing patches for packaging that’s convenient. It also makes selecting the filename in the terminal easier, no need to avoid the a/ and b/ prefixes.
    git config --global diff.noprefix true
    
  • (Functionality) Worktrees. These make a cheap clone of a given tag or commit in a subdirectory. Useful for exploring diffs, doing regressions, etc. Also easy to clean up. I use it in Calamares ci/txcheck.sh to quickly rebuild translations between a moving tag (translation) and master so that I can see if I’ve committed any string changes since the tag. That, in turn, informs my release decisions since I would like to avoid releases with untranslated strings. (Source for that translation-checking script)

The two configuration changes get applied in all my accounts and machines immediately; worktrees get a workout as needed (at least once per Calamares release, although that’s automated).