Sunday, 15 March 2015

git - How do I make commit diff appear in commit message while I'm editing it (with Vim)? -



git - How do I make commit diff appear in commit message while I'm editing it (with Vim)? -

my biggest bottleneck in vim moment when need write commit. often, not remember diff. first write "git diff". write "git commit" but, ... "hey! not remember ...". thus, need stop write commit message, come , run diff message. work 2 windows: on left run "git diff". on right run "git commit". allow me write commit message complete, while can watch diff of each file, ... , on.

can help me improve moment in vim workflow?

use git commit -v see diff in vim while committing.

-v, --verbose show unified diff between head commit , committed @ bottom of commit message template. note diff output doesn't have lines prefixed #.

git vim

No comments:

Post a Comment