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

Re: git mv + git pull issue

From
CDChristoph Duelli <duelli@melosgmbh.de>
Date
Jun 9, 2008, 08:45 UTC
Message-ID
<484CED98.3070506@melosgmbh.de>
In-Reply-To
<alpine.DEB.1.00.0806061639390.1783@racer>
Johannes Schindelin schrieb:
Show 14 quoted lines
> Hi,
> 
> On Fri, 6 Jun 2008, Christoph Duelli wrote:
> 
>> cd ../gitmv
>> git mv afile newname
>> # do not commit
>> # now: afile is not in the directory anymore
>> # oh, I need those changes my colleague made...
>> git pull ../gitmv-clone/
>> # now: both(!) afile and newname are in the directory
> 
> What is so surprising there?  We _always_ recommend to commit before 
> pulling.

Well, when I modify a file, and pull afterwards: my 'modification' is never lost (the pull might fail, though). If we consider the removal of a file as a kind of modification, one would expect a similar behaviour.

I do agree that this is not (nec.) a bug, still I thought it worthwhile to bring the matter up. In our repository we get duplicates now and then because of it.

Regards
-- 
Christoph Duelli
Previous: Johannes Schindelin
Message 3 of 3 in “git mv + git pull issue”
  1. Christoph DuelliJun 6, 2008
  2. Johannes SchindelinJun 6, 2008
  3. Christoph DuelliJun 9, 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.