checkout โ ๏ธ
git checkout --help
# will explain that the command can be used to
# Switch branches or restore working tree files
Almost 5 years ago, Git introduced two new commands with a clear separation of responsibilities previously designated for checkout
. Read more on the GitHub Blog in Highlights from Git 2.23
Even if you have used git checkout
for yonks and old habits die hard, I recommend considering picking up these newer commands โ even if only for teaching newcomers. Friends donโt make friends learn checkout
when these two have been introduced to make our Git lives easier: