Thread (1 message) 1 message, 1 author, 2022-10-21

Re: 'git commit .' in a subdirectory also commits staged files in other subdirectories

From: Junio C Hamano <hidden>
Date: 2022-10-21 22:02:17

Taylor Blau [off-list ref] writes:
quoted
'git commit .' in one of them attempted to commit all of them, not
only the files in that subdirectory.

This is a very unreasonable behavior, because while being in any
subdirectory 'git commit .' should only affect that subdirectory, and
not files elsewhere.
That isn't right, though I can't reproduce what you describe from your
report. Try this script out:
...
"git commit --include ." would exhibit the behaviour, but that
should not be the default, so I am also puzzled.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help