git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Tracked file suddenly disappeared just prior to commit.

From
KKKaz Kylheku <kkylheku@gmail.com>
Date
Nov 12, 2009, 20:10 UTC
Message-ID
<3f43f78b0911121210h4771984cqed561ca5d8c2d859@mail.gmail.com>
I am running git 1.6.5rc2 on a somewhat dated system (RH EL 4, i686).

The working copy is on an NFS mount from ``Big File Server used by Lots of People''.

I ran ``git diff > diffs'' to capture some work. I was then editing the ChangeLog file, making comments based on the diffs. I had modified two files: a C source file and its corresponding header. I spent maybe ten minutes doing up the ChangeLog entry for these changes.

Then I quit the editor and ran ``git commit -a''.

In the commit comment, I saw git's shocking report that the C file had been deleted! Apparently, I am about to commit a deletion of the file I hacked on! So I emptied the comment to abort the commit. I listed the directory and surely enough, the file was gone.

For a split second I thought that I lost the changes, but then I realized I had the diff in the "diffs" file, so I recovered with a ``git checkout'', followed by a patch. Phew!

How could that have happened? I haven't seen issues like this with the NFS server at all. The file hadn't been recently created, and it hadn't been touched for 12 hours since I made the changes.

Could another user have deleted the file as a prank? In this insecure environment, you can impersonate another user to get around directory permissions. It can't be logically ruled out that someone was messing with my working copy.

I checked my bash history as well as the command history in Vim, but could find no traces of any accidental delete command, or any command which might lead to deletion. It all points to either git, the NFS server, or a prankster.

Strange!
Message 1 of 1 in “Tracked file suddenly disappeared just prior to commit.”
  1. Kaz KylhekuNov 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.