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

Overwriting untracked working tree files (when identical)

From
Asheesh Laroia <asheesh@asheesh.org>
Date
Nov 29, 2008, 18:58 UTC
Message-ID
<alpine.DEB.2.00.0811290018340.15382@vellum.laroia.net>
I was using git earlier today and got the familiar error:
 	"Untracked working tree file 'filename’ would be overwritten by merge"

As it happens, I know that filename in my local filesystem and filename in the remote git branch have the same contents.

Would it make sense for git to check for this possibility, and if the working tree file is the same as the file being merged in with that filename, allow the overwrite?

(I received the message with "git pull," so I imagine it was emitted by the recursive merge driver.)

-- Asheesh.
-- 
Reply hazy, ask again later.
Next: Andreas Ericsson
Message 1 of 2 in “Overwriting untracked working tree files (when identical)”
  1. Asheesh LaroiaNov 29, 2008
  2. Andreas EricssonDec 1, 2008

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.