I have used git using both command line and GUI, I used to use SourceTree as Git GUI, and in SourceTree, you could, for every modification in a file, visualize wich line were added/removed, and zone of changement were wrapped into block that you could add or not.
For instance, let's take this file:
Foo
Bar
Baz
Git is awesome!
I modify it to that :
Foo
Modif 1
Bar
Baz
Git is awesome!
Modif 2
SourceTree allow you to only select "Modif1" to be staged for commit, leaving Modif2 unstaged, but not deleted, in my local files.
But git status
only give me the name of the files that are modified and you can't go with such precision into what will be staged and what won't be staged.
How can I, in command line only, achieve this precision?
The only way I found is to git diff, remove every part you don't want to stage, then commit, and replace the part you haven't staged. That is extremely unconvenient.