git: prefer switch over checkout

133 · Thiago Perrotta · March 20, 2025, 1:11 p.m.
Summary
This blog post discusses the differences between the Git commands 'git switch' and 'git checkout', emphasizing the ambiguity of 'git checkout' and how 'git switch' simplifies branch switching. The author shares personal experiences to illustrate the confusion caused by a directory named 'main' interfering with the 'git checkout' command, concluding with an updated alias that incorporates 'git switch' for clarity and efficiency.