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

pulling the root commit overwrites untracked files without warning (1.7.2.3)

From
GPGert Palok <gert@planc.ee>
Date
Oct 21, 2010, 13:18 UTC
Message-ID
<AANLkTimDnyzyV1FEEwEuxLfG1nSOcNa7Hzwt7DDssjba@mail.gmail.com>
Hi
On 1.7.2.3, pulling the root commit overwrites untracked files

Minimal working example: $ git init wc1 $ cd wc1 $ echo a > a $ git add a $ git commit -m "added a" $ mkdir ../wc2 $ cd ../wc2 $ echo b > a $ git init $ git remote add origin ../wc1 $ git pull origin master $ # expected: error: Untracked working tree file 'a' would be overwritten by merge. Aborting $ # actual: no error $ cat a $ # expected: b $ # actual: a

An excerpt from the session:
gert@planc ~/test/wc2 git[master?]
768$ git pull origin master
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From ../wc1
 * branch            master     -> FETCH_HEAD
gert@planc ~/test/wc2 git[master]
769$ cat a
a
-- 
Gert Palok
Next: Clemens Buchacher
Message 1 of 9 in “pulling the root commit overwrites untracked files without warning (1.7.2.3)”
  1. Gert PalokOct 21, 2010
  2. Clemens BuchacherOct 22, 2010
  3. Clemens BuchacherOct 22, 2010
  4. Clemens BuchacherNov 14, 2010
  5. do not overwrite untracked during merge from unborn branchClemens Buchacher, Nov 14, 2010
  6. do not overwrite untracked during merge from unborn branchClemens Buchacher, Nov 14, 2010
  7. do not overwrite untracked during merge from unborn branchClemens Buchacher, Nov 14, 2010
  8. Miles BaderNov 15, 2010
  9. do not overwrite untracked during merge from unborn branchClemens Buchacher, Nov 14, 2010

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.