3 ms·
> 4. use `git add -p` I strongly recommend tig
by okl 5y ago
> 4. use `git add -p`
I strongly recommend tig
- dljsjr 5y agolazygit is also great. VS Code also makes it easy to stage hunks in the editor if you like to stay in your editor; in the diff viewer from the Git view you can highlight the lines you want to stage and right click -> stage selected ranges. I've never used tig. I'll look at it.
- cerved 5y agowhat's the advantage over partial?
- okl 5y agoGive it a try and compare. tig lets you either stage hunks ('u') or lines ('1'). You can also adjust the context ('[', ']') and split chunks ('\') and revert chunks ('!') all from the same view.
- cerved 5y agoI will thanks but I must say in mostly very happy with --partial, except stash which is slow, or when there are 20+ hunks
- atq2119 5y ago+1 for tig, and for the folks that are less TUI-inclined, there's `git gui`; a neat little tool which is far too little known considering that it's part of core Git. One of the nice things about `git gui` is that it has an "amend last commit" mode that makes splitting up a commit trivial (unless the commit also adds or removes files -- in that case, you're going to have to do some more work).