Thread (1 message) 1 message, 1 author, 2016-08-11

Re: git-commit: select which files to commit while editing the commit message

From: Seth Falcon <hidden>
Date: 2016-08-11 20:23:51

Jakub Narebski [off-list ref] writes:
Seth Falcon wrote:
quoted
Spelling out a bunch of files spread around your tree for update-index
can be annoying.  Some way of marking a list seems natural.  Maybe
that is a separate issue.
Perhaps git-commit should also accept --exclude=<pattern> option?
Would that help?
I don't think I understand what an --exclude=<pattern> option would
do, but I'm pretty sure it doesn't help the use case I'm thinking of:

   Editing away, you've made changes in 8 files.

   Reviewing diff, you want to commit 6 of those and continue working
   on the other two.

   It seems that there could be a less manual way than 
   git update-index f1 f2 ... f6


Hmm, maybe I could do:

   git diff --name-only > changed
   ## edit changed
   cat changed|xargs git update-index

I suppose this could be wrapped in a simple way to bring up an editor.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help