I want to stage a file or a hunk using vc-git (the vc system that comes with Emacs). How do I do this?
(To clarify, I made modifications on a file that is already (registered) in git. I would like to stage the new modifications made. How do I do this with vc-git?)
vc-git-register
, which does a little bit more -- the first argument needs to be in list form. If you want it to do less, then you may need to create a custom function. To see what makes it tick, you can useM-x find-function
.vc-git
does not provide any means to manipulate Git's "index", instead it tries hard to hide it. You'll probably be better served by Magit if you want to use that kind of Git feature from Emacs.