Skip to contentSkip to conversation

git commit -p? --loop?

DISCUSSION Ittay Dror 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Ittay Dror

author
#0 lore raw

Hi,

I find that many times I make changes to some files that should be part of different commits. What I do then is run 'git add -p' and 'git commit' several times until I commit all hunks. Does it make sense to anyone to add -p option following a '-a' and '--loop' option (that will run until user requests to end or nothing to commit)?

Thanks,
Ittay

Signature · 2 lines
--
Ittay Dror <[email protected]>
#1 lore raw
Quoted 5 lines · Ittay Dror

I find that many times I make changes to some files that should be part of different commits. What I do then is run 'git add -p' and 'git commit' several times until I commit all hunks. Does it make sense to anyone to add -p option following a '-a' and '--loop' option (that will run until user requests to end or nothing to commit)?

I wonder if "git commit --interactive" would not suit your needs?

Signature · 3 lines
Cheers,

Sverre Rabbelier