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

Git pull silently removing files in the index

From
SSStefan Schüßler <mail@stefanschuessler.de>
Date
Jun 17, 2013, 10:14 UTC
Message-ID
<D08911E9-6589-4A1F-9B1C-9D3F66438753@stefanschuessler.de>
I think there's a bug in git pull. Doing a git pull in a fresh repository without any commits removes files in the index.
Example:
  $ mkdir foo 
  $ cd foo
  $ git init
  $ touch file1 file2
  $ git add file1
  $ ls
  file1 file2
  $ git pull https://github.com/sos4nt/empty.git master
  $ ls
  file2
"file2" is still there, but "file1" was silently removed and no error message was shown.
I'm running git 1.8.3.1
Cheers, Stefan
Message 1 of 1 in “Git pull silently removing files in the index”
  1. Stefan SchüßlerJun 17, 2013

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.