by Jianghong94 · 1y ago · 0 comments
Things that I use (and I like): 1. quick checkout to another branch and automatically stash and unstash your local changes; when I just need to inspect code elsewhere I find it really useful. My changes are small so I can always remember to stash them later; 2. compare branch/commit etc via UI; again I know you can do that in git diff, but then you would need to know the command and the commit SHA to compare; in UI it comes in really handy, just select the branch or commits you want to compare and that's it. I've seen my coworkers trying to come up with the command and I just say: use IDE and a couple of clicks they got it working. 3. filter commits by user and by folder.
That's a great point. I should have mention the IDE Git UIs, def a nice option and sounds like the JB one works well for you!
I do use it heavily for "annotating git blame"!
I've never consider using JB Git UI fully mainly because of the point made earlier, so stability (https://news.ycombinator.com/item?id=45898089). Once you learn, especially visually, you don't want cosmetic changes. IDEs change yearly to stay "consistent".
Another point is portability. E.g. I didn't want to pay for personal use of JB (so rare case), so I have to use different IDE. Separate tools (especially free and OSS) is a big advantage. Not mentioning ability to use it on remote shells or different machines!
lazy git offers 1, but 2 and 3 points are interesting. Wonder if there's an easy way to compare commits and filter commits by user and folder in lazygit. (:
EDIT: Actually, I also use JB for conflict resolutions ;P so not entirely 100% lazygit flow.
IMHO another good thing of using JB IDE git UI (especially in a corporate setting) instead of using another software is that everyone has the IDE so it's easier to collaborate. Imagine if you're helping a junior member debug their local branch and they don't have lazy git installed.
Beyond that: separating into change lists (staging changes by line inside a file) and the graphical presentation and filtering of the commit history (highlighting what commits are in/out of your branch, show the git history of a section or line of code, show repo files at a commit)