Eric’s Git Tips

Checkout the previous branch with

git checkout -

Enable rerere by adding the following lines to ~/.gitconfig

[rerere]
enabled = true

Now git will remember how you resolved previous merge conflicts and auto-apply your action if the same conflict arises.

Favor atomic PRs, not just atomic commits.

Add this alias in your ~/.gitconfig

[alias]
exec = "!exec "

to provide an alias for running commands in the root of your git repository. For example, git exec make will run make in the top-level of your repository.

--

--