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

git-status rename conflict with a few git-adds following a git-mv (git for windows 1.9.4)

From
PRPanos Rontogiannis <p_ronto@hotmail.com>
Date
Aug 12, 2014, 09:48 UTC
Message-ID
<DUB121-W21E71C6BC416DC373C068388EA0@phx.gbl>
Hello all,
I noticed a weird rename conflict after doing the following steps:
   1. Changing the extension of a file using 'git mv'.
   2. Editing the file and staging the changes.
   3. Creating a new file and staging it.
Here is the Git Bash output showing the issue. The previously mentioned steps are highlighted with asterisks.

$ git --version git version 1.9.4.msysgit.0

$ git status On branch master Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
**** STEP 1 ****
$ git mv src/documents/contact.html.md src/documents/contact.html.md.eco

$ git status On branch master Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        renamed:    src/documents/contact.html.md -> src/documents/contact.html.md.eco
**** STEP 2 ****

$ git status On branch master Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        renamed:    src/documents/contact.html.md -> src/documents/contact.html.md.eco
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
        modified:   src/documents/contact.html.md.eco
$ git add src/documents/contact.html.md.eco

$ git status On branch master Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        deleted:    src/documents/contact.html.md
        new file:   src/documents/contact.html.md.eco
**** STEP 3 ****

$ git status On branch master Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        deleted:    src/documents/contact.html.md
        new file:   src/documents/contact.html.md.eco
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        src/partials/address.html.md
$ git add src/partials/address.html.md

$ git status On branch master Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        new file:   src/documents/contact.html.md.eco
        renamed:    src/documents/contact.html.md -> src/partials/address.html.md
Note here that the renamed object is wrong. Also note that I haven't commited the changes to the repo. 
The repo is cloned from "https://github.com/prontog/elm".
Regards,
Panos
  		 	   		  
Message 1 of 1 in “git-status rename conflict with a few git-adds following a git-mv (git for windows 1.9.4)”
  1. Panos RontogiannisAug 12, 2014

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.