Quick notes on Git for reference.
git maintenance start
– This command starts maintenance on a specific repository and speeds up other Git commands by optimising repository data.git config -g branch.sort -committerdate
– I never liked that git branches are not sorted by the last commit time first. This fixes the problem.git config -g column.ui auto
– Git branches are laid out in a list by default. I prefer them to be displayed in columns graphically.git push --force-with-lease
– This is safer than--force
. It won't overwrite any work on the remote branch if more commits were added by another co-worker. This helps prevent accidentally overwriting someone else's work by force pushing.git log -L FROM_LINE,TO_LINE:FILE_PATH
– This allows you to see the git history of a chunk of code within a single file.