Thanks for this complete and comprehensive guide. One thing I noticed is that you recommend using ´checkout´ to switch branches in your cheatsheet. I have also done that for a long time until I found out that ´switch´ exists since a couple of years now, which is the more conscious and more specific command for switching branches with a few optimisations. So I would suggest using ´switch´ instead of ´checkout´ when switching between or creating new branches (with ´git switch --create´ instead of ´git checkout -b´).

Here is a conversation about checkout vs switch in more detail: https://stackoverflow.com/a/70454786/16154479

Written by René Reifenrath

I am a software developer from germany. Blogging about programming and tech related topics. I ❤️ open source and privacy.

No responses yet

Write a response