useful git tidbits

  1. --force-with-lease

git push --force-with-lease – safer than just --force since if it doesn’t expect the same commit before the force push to be there as yours, it doesn’t push it.

  1. git maintenance start

makes things faster. Does a bunch of stuff in the config that does automatic stuff in the background using systemd timers

  1. git blame -w -C -C -C

much better than just git blame cause it’s smarter about moving of the lines and ignores whitespaces.

  1. git log -S {regex|string}

filter git log output that has the regex in

  1. git ls-remote

Can be used to pull in the PRs of a remote repository, we don’t have to add PR’s repo as remotes