Abstract
In the article "Modern Git Commands and Features You Should Be Using," the author highlights the importance of staying updated with new git commands beyond the basic ones like add, commit, push, and pull. The introduction of features like git switch and git restore in Git version 2.23 has made branch switching and file restoration more efficient for software engineers.
The author emphasizes that utilizing modern git commands can significantly enhance productivity by simplifying tasks that were previously more complex. By exploring these new features, developers can streamline their workflow and avoid potential errors or inefficiencies.
Stats
New since 2019, or more precisely, introduced Git version 2.23.
git switch - # Switch back to previous branch, similar to "cd -".
git restore --staged some-file.py.
git restore --staged --worktree some-file.py.
git restore --source HEAD~2 some-file.py.
Quotes
"All of us — software engineers — use git every day, however most people only ever touch the most basic of commands."
"Using modern git commands can make your life so much easier."
"Switch performs extra sanity checks that checkout doesn't."