2

I have tried git checkout -- . many times but it seems not to do anything.
And i use all from this question

git status
On branch master
Your branch is up-to-date with 'origin/master'.
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:   File.ini

no changes added to commit (use "git add" and/or "git commit -a")

ls -al:
-rw-r--r--   1 user  staff   867 15 nov 00:52 File_1.ini
-rw-r--r--   1 user  staff   399 15 nov 00:52 File_2.ini
-rw-r--r--   1 user  staff   900 15 nov 00:52 File_3.ini
-rw-r--r--   1 user  staff   168 15 nov 01:00 file.ini

git config --list --show-origin:
file:.git/config    core.repositoryformatversion=0
file:.git/config    core.autoclrf=false
file:.git/config    core.filemode=true
file:.git/config    core.bare=false
file:.git/config    core.logallrefupdates=true
file:.git/config    core.ignorecase=true
file:.git/config    core.precomposeunicode=true
file:.git/config    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config    branch.master.remote=origin
file:.git/config    branch.master.merge=refs/heads/master
FreshD
  • 2,914
  • 2
  • 23
  • 34
beytok
  • 23
  • 5
  • What's your operating system? Are you on a shared drive of some type? Have you changed any git configuration? What's the output of `git output --list --show-origin`? – Edward Thomson Nov 14 '18 at 23:23
  • *git reset —hard* would remove all uncommitted changes – 0andriy Nov 14 '18 at 23:24
  • after git reset --hard git status say "modified: file.ini" again reset --hard "modified: File.ini" – beytok Nov 14 '18 at 23:26
  • @EdwardThomson macos, no git configurations changed. git output --list --show-origin :: git: 'output' is not a git command. – beytok Nov 14 '18 at 23:32
  • Sorry; I meant `git config --list --show-origin`. (Apologies.) – Edward Thomson Nov 14 '18 at 23:34
  • @EdwardThomson `file:.git/config core.repositoryformatversion=0` `file:.git/config core.autoclrf=false` `file:.git/config core.filemode=true` `file:.git/config core.bare=false` `file:.git/config core.logallrefupdates=true` `file:.git/config core.ignorecase=true` `file:.git/config core.precomposeunicode=true` `file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*` `file:.git/config branch.master.remote=origin` `file:.git/config branch.master.merge=refs/heads/master` – beytok Nov 14 '18 at 23:39
  • what does `git diff` show? – Mark Adelsberger Nov 15 '18 at 00:49

1 Answers1

2
modified:   File.ini
-rw-r--r-- 1 user staff 168 15 nov 01:00 file.ini

That looks like a case issue: File.ini vs. file.ini

One way would be for your MacOs volume disk to be "Mac OS Extended (Case-sensitive, Journaled)" in "Format".

Another would be git config core.ignorecase false, or git mv file.ini File.ini

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you. But this command `git config core.ignorecase false` doesn't work and `mv` is the last i do. I'll try first way maybe helps. – beytok Nov 15 '18 at 20:58
  • Thanks! Create volume disk with Case-sensitive, Journaled helped me! – beytok Nov 15 '18 at 23:03
  • Cygwin also seems to have this issue. Not clear if there is a fix in that case. – personal_cloud Jun 28 '22 at 05:50
  • @personal_cloud Not clear indeed. Since git bash (packaged with Git For windows) or WSL, I do not use Cygwin since quite a long time ago. – VonC Jun 28 '22 at 05:52