threads / discuss / 37335

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

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

## tl;dr

One message between Aug 12, 2014 and Aug 12, 2014.

replies: 0people: 1as markdown or json

Panos Rontogiannis· Aug 12, 2014, 09:48 UTC · lore
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
  		 	   		  

← back to recent threads