Thread (1 message) 1 message, 1 author, 2016-06-15

Re: way to automatically add untracked files?

From: Miles Bader <hidden>
Date: 2016-06-15 22:43:26

"Shawn O. Pearce" [off-list ref] writes:
quoted
    mv foo.cc bar.cc
    git add .
Right.  Who wants "add" to actually mean "add and delete"?
Shouldn't that be then called "git-add-and-rm"?
"git-add ." can just as easily be thought as meaning "add the current
state of directory ".", including additions and removals"; removals,
are, after all, part of the directory's state.
quoted
Am I doing something wrong, or is this just missing functionality?
Try adding the -M option to "git-diff".  That will enable the rename
detection, and show the rename you are looking to see.
No, it doesn't.

The problem seems to be not because git's rename detection isn't enabled
(I have it turned on by default in my globaing settings), but rather
because git hasn't been told about the removal.

And I don't see anyway to automatically tell git "please mark for
removal all files that seem to have disappeared" -- "git-add ." doesn't do
it, and git-rm doesn't seem to have any option for doing this.

Really I want a single command that just tells git "please add to the
index _all changes that you can find_".

Thanks,

-Miles

-- 
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help