As many of us shift from being software engineers to software managers, tracking changes the right way is growing more important.
It’s time to truly understand and master Git.
As many of us shift from being software engineers to software managers, tracking changes the right way is growing more important.
It’s time to truly understand and master Git.
After using git for about 15 years, I still find "git merge" unpleasant and hard to track changes. I've always had better experiences rebasing my branch on top of the current main and then committing the resultant changes. Of course it helps if you are regularly rebasing from main rather than leaving it until the end, but the process still usually feels cleaner than with git merge.
The only downside of rebasing (for me) is it looks confusing when commits aren't sequentially in date order, and sometimes it feels like you need to resolve the same conflict several times (once for each commit that gets rebased if they touch the same code) but that usually works out better for me than a regular merge.
I'd recommend using git switch instead of checkout, since the checkout command is so overloaded. And restore instead of checkout for restoring changes.
> This document wants to be a reference for best practices in the daily use of Git
Then it wouldn't stick to the most ineffective interface for git - cli
Eh. If you're interested in sharpening your vcs toolchain, just learn jj already
I've learnt jujutsu. It took me a couple weeks to get it but 100℅ worth it. I've always intuitively understood git but jj does make a lot of annoying things easy. My commit history is now much cleaner than ever before. It's not for everyone though. Takes a lot of upfront investment to learn when git is often already good enough.