Hacker News new | ask | show | jobs
by davvid 4122 days ago
I noticed that the description says, "Inspired by SourceTree" for the line-by-line staging feature, but actually git-cola[1] invented that feature, before even git-gui, and SourceTree just copied us 8^)

Also, if you're going to have that feature you should consider implementing the entire thing ~ it's not enough to have line-by-line (un)staging. You also need line-by-line reverting of modified changes, and support line-by-line (un)staging while amending commits.

I'll definitely be sharing this with my sublime-using coworkers, very cool.

[1] https://github.com/git-cola/git-cola

3 comments

I wish I'd remembered git-cola when I started work on this! SourceTree doesn't really reveal what it does under the hood when staging lines, and I was looking for something open source to reference.

I totally agree about additional use cases for manipulating lines. v1.0 included the features I use every day and allowed me to use it as my daily driver. I'll add a couple of issues for this. Thanks!

After re-reading your comment, one additional note. Line/hunk reverting is supported. I think it could stand improvement with regard to amending commits, tho!
Good work, though. I think it's super handy, even in its current incarnation and feature set.
I'm not familiar with Git-cola, but Magit on Emacs has had line/selection staging, unstaging, reverting etc. for a very long time. (Edit: well over 7 years)
I use git-cola every day, very nicely done!