Learning Git
Tips on learning Git as I moved my primary toolchain to Ubuntu 20.04 on WSL2
Getting started
- Atlassian Git tutorials
- Git beginners guide - at 11 hours, it's much more than a beginner's guide
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?
- Git commit message template
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