0

I changed all filenames in a folder to lowercase (in Windows CDM as here explained):

$ D:\
$ cd my\folder
$ for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")

Now I expected git status to display me the changes, that I could add & commit. But Git seems to ignore these renamings.

As workaround I can e.g. rename the folder, commit it, rename it back and commit it again. Or something like this. But I'd like to find a "healthy" solution.

I also don't want to rename with git mv. So what I'm looking for is, how to (rename with OS tools and then) commit the filename (case) changes.

Is there a way / How to commit case changes in filenames, after the changes have already been made (means: without git mv)? (Perhaps with some Git configurations?)

Arount
  • 9,853
  • 1
  • 30
  • 43
automatix
  • 14,018
  • 26
  • 105
  • 230
  • @CodeCaster It's not a duplicate, since the it's about another situation: after the renaming. – automatix Aug 03 '17 at 10:59
  • @Chris It's not a duplicate, since the it's about another situation: after the renaming. – automatix Aug 03 '17 at 10:59
  • @CodeCaster I did. Once again: I want to resolve this without `git mv`. – automatix Aug 03 '17 at 11:02
  • @CodeCaster Already tried that (` git config --global core.ignorecase false`). No effect. – automatix Aug 03 '17 at 11:05
  • No, you should edit your repo's config. Repo configs override global configs. Your repo's config has it set to `true`. – CodeCaster Aug 03 '17 at 11:07
  • 1
    @CodeCaster Just tried `git config --local core.ignorecase false` -- it works. Feel free to post it as answer, I will `accept` it. – automatix Aug 03 '17 at 11:09
  • 2
    Meh, just accept the duplicate and I'll be happy. :) Your phrasing will help others find this question, which will then be linked to that duplicate. – CodeCaster Aug 03 '17 at 11:15

0 Answers0