I am editing files opened split into three windows. I want to commit those into the repository. Is there any commands to do that?
How can I commit files currently displayed in Vim with fugitive?
12.9k views Asked by katatagan At
        	2
        	
        
	I am editing files opened split into three windows. I want to commit those into the repository. Is there any commands to do that?
There are a few ways to accomplish this task. I will outline the most interactive method which uses
:Git.:Git<c-n>/<c-p>-ccwhilst in the status window:x)zjandzkto move between sections-on a section will stage/unstage all the files in that sectionFor more help with
:Gitsee:h :Gitor:Gwhen in the:Gitbuffer.Can use
:Gwriteor:Gwand:windoto skip the:Gitwindow to make this a bit faster.You can also skip the whole commit window by using the
-mflag. e.g.:Git commit -m "A short message"I recommend official repo on GitHub and Vimcasts videos on Fugitive: The Fugitive Series - a retrospective
To learn more see: