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

Re: GIT pull

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 12, 2012, 16:58 UTC
Message-ID
<4F8709CA.6080102@kdbg.org>
In-Reply-To
<1334242077960-7459655.post@n2.nabble.com>
Am 12.04.2012 16:47, schrieb cvalusek:
Show 11 quoted lines
> My team has had a lot of trouble with GIT lately because of aborted pull
> commands.
> 
> If a user has local modifications not on the index and does a pull, I have
> seen git attempt to start applying the merge to master and abort. The whole
> checkout is then left in a terrible state that is nearly unrecoverable. In
> the past, I thought GIT would run some sort of check to identify these
> problems before it attempts the merge.
> 
> Even with a clean state (nothing to commit), I have seen the same thing
> randomly happen at least once.

As others pointed out, this should not happen. That leaves one possibility: You are on Windows, and you very likely have one or more of

- a virus scanner
- an IDE

running. It can happen that one of these programs happen to look at a file at the same moment when git is trying to remove or rename the file. This fails because on Windows a file that is open cannot be removed or renamed. In this situation, the merge/checkout is aborted in the middle and leaves a mess behind.

There's not a lot that can be done about it. I thought we have some counter measures in our compatibility layer (e.g., retry the removal if the first attempt fails due to permissions), but I have seen this happen nevertheless. I haven't tried tracking it down because it happens so rarely for me, and it didn't hurt *too* much so far.

-- Hannes
Previous: Michael WittenNext: cvalusek
Message 4 of 5 in “GIT pull”
  1. cvalusekApr 12, 2012
  2. Matthieu MoyApr 12, 2012
  3. Michael WittenApr 12, 2012
  4. Johannes SixtApr 12, 2012
  5. cvalusekApr 12, 2012

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.