Git
Git is the dominant Source Code Management tool in use today. Having a good understanding of git is very useful and kind of a must if you collaborate regularly with other developers. It can be frightening in the beginning but mastering common use cases is actually very simple.
Learning git is an investment that heavily pays off. Incorrect use of git can make you and your coworkers plenty of time, for example:
- You might think you have lost some commit but it is still there!
git reset HEAD~1
doesn’t lose any data committed data. - You don’t know your way around merge conflicts: zdiff3, AUTO_MERGE ref, –diff-merges options are of great help!
If you are reading this and don’t feel very comfortable working with git a daily basis you should have a look at the Resources section.
Note: Jujutsu looks very nice.
Resources
- https://git-scm.com/doc, https://git-scm.com/book/en/v2
- https://blog.gitbutler.com/ https://www.youtube.com/@gitbutlerapp/videos
- https://docs.kernel.org/process/submitting-patches.html https://git-scm.com/docs/SubmittingPatches
- https://jvns.ca/#git
- https://missing.csail.mit.edu/2020/version-control/
Looking at the git log of projects such as git and linux is also very instructive.
Tools
I find tig to be very useful. I learnt about it after reading an interview to Junio Hamano, git’s maintainer.
Lazygit is great tool too.
For email-based workflows, b4 is a must. After I played a bit with the email workflow I naively thought that the vanilla workflow wasn’t that bad, but I couldn’t have been more wrong. Use b4!
Further reading
B4
Introduction to the b4 tool
Git cheatsheet
Useful git commands, aliases and configuration options
Git rebase
Discussion of git rebase and benefits of its usage