Re: Deleting files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shak" <sshaikh@xxxxxxxxxxx> wrote in message news:g2r1sb$tut$1@xxxxxxxxxxxxxxxx
"Shak" <sshaikh@xxxxxxxxxxx> wrote in message news:g2r19e$s6e$1@xxxxxxxxxxxxxxxx
Hi,

Are files supposed to be continually tracked after commiting after deleting them?

git status reports that files have been deleted as expected (they're not there anymore). I commit as wanted. I do some more work, but then git status still reports that the same files have been deleted. As such I have a historical list of "deleted" files that I may have been working on previously and had committed.

I have to run git rm to erase these entries, but I've no idea how that affects my history.

Shouldn't git add/commit remember that a file has been deleted previously?

On a related note, once I do git rm on one of these files, git status sometimes reports that these rm'd files have been renamed to a new one instead! What's going on? :(

To be clear on the last point, git seems to be incorrectly detecting that I've copied (sometimes to the same directory) and renamed files. What's the difference anyway? And is there anyway to override it's overzelaous assumptions?


To rudely reply to my own message a second time, it seems I have to explicitly run "git add -u" to actually commit deletions before committing. I don't notice any changes in "git status" so there doesn't seem a way of knowing that it's required.

I've also noticed that renames aren't detected until you commit a delete.

This is all becoming very counter-intuitive :(

Shak

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux