tweaks from https://ochronus.com/git-tips-from-the-trenches/