I’m wondering if you use any (graphical) clients to manage your Git, and if so, what client you use.
I myself have to use git professionally across all 3 major OS-es, and I currently use Sourcetree on Windows and macOS, and the Git tools built-in into IntelliJ on Linux.
Have given MaGit a try, but just couldn’t get all the shortcuts to stick in my mind.
Interested to hear your experiences!
I usually use
git add -p
to selectively stage hunks. But ingit add -i
I think running thepatch
command does the same thing to get into patch mode.If patch mode shows you a hunk, and you only want some of the lines you can press
s
to split into smaller hunks. Then you’ll be prompted whether to add each smaller hunk separately.If you want to stage a change that is on the same line as a change you don’t want to stage, or on an adjacent line, then you need to use
e
to edit the hunk. Git stages whatever changes are left when you’re done editing. The file in the working tree on disk is unchanged.