
Let’s be honest — Git can feel like a double-edged sword. On one hand, it’s the backbone of modern software development. On the other, it’s a labyr...
For further actions, you may consider blocking this person and/or reporting abuse
Initially sceptical, but I am satisfied with this article. 👍
Glad you found it useful!
TIL range-diff, notes, and worktree.
I'm not so sure I see the point in worktree, given you can checkout a different branch to a different folder anyway, but the cost is that it gets confusing as to which is which.
If you name the folders after their branch, e.g. "myproject-develop" and then in the future want to switch branch, then you have two things you need to keep in sync.
...unless that different folder's git metadata is held in one place. That'd save you a lot of disk space, potentially.
The cost there is that if you decide you don't need one of the folders any more and delete it, you might delete the one with the metadata in it!
I haven't tried it yet, but I think it sounds a little faustian.
On the other hand, while I was generally aware of sparse-checkout, I never bothered to find out what it actually did until now. Where I've seen it before, usually in CI jobs, it's just been something I've assumed gave you a bare repository!
Good points on worktree! The centralized metadata does help with disk space, but as you said, it also adds a layer of risk if a key folder gets deleted. I guess it’s useful if you frequently switch between branches but want to avoid duplicate repositories.
Sparse-checkout is something I also overlooked before—curious to see if it improves workflows in practice!
Git bisect is the best. Can't tell you how many times it's helped me find issues quickly.
Main thing, though, is that it's helpful if committers try to make sure they are always committing code that doesn't break in an obvious way. It can be hard to bisect when you land on a specific commit that doesn't build and has nothing to do with the problem you're looking for.
That's true. Thanks for sharing!
Thanks! Actually learned something instead of the usual "here are 10 commands you definitely use every day already".
Indeed! Couldn't agree more.
Really helpful article
Well done Arpit!
Made my day, thank you :)
I really liked the
git bisect
I wish I new about it before. Thank you for sharing it.Happy to help :)
solid! Subscribed
Loved it, thank you so much John :)
Really well written!
Thnkew!
This article deservers at least thrice the reactions.
Your comment made my day! Thanks a ton, Citron.
Really very informative article, specially git bisect is awesome. Thanks for sharing such a valuable content with us
Means a lot, thanks a ton Fahad!
I love lazygit for the same reason, keeps me from having to google things I don't do daily:
github.com/jesseduffield/lazygit