Tips on learning Git as I moved my primary toolchain to Ubuntu 20.04 on WSL2
Getting started #
Tips and tricks #
- Rename a local branch:
git branch -m <old_name> <new_name>
- Reset local repository branch to be just like remote repository HEAD:
git fetch origin
git reset --hard origin/master
- Show just the files which changed in each commit:
git log --name-only --oneline
- Dangit, Git!?!
- A brilliant "choose your own adventure style" tree On undoing, fixing, or removing commits in git - I find myself drawn to it, given it has questions like:
Are you trying to find that which is lost or fix a change that was made?
Going deeper #
- (Paid) Git for humans
- (Paid) Git advanced 6 additional hours on top of the free guide above - I watched this on O'Reilly
- Pro Git book
- GitHub's training labs
- When to use Git Rebase - although Why you should stop using Git rebase is also good to consider
Tagged#git #linux #tools #wsl2
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖! For feedback, please ping me on Twitter.