1

I have a very weird behavior with git. I have a file with some local changes that I like to revert to the last commit. My procedure is the following:

git status

On branch 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: doc/pySPM Documentation.ipynb 

then I do git checkout -- doc/pySPM\ Documentation.ipynb

but it's like it does not do anything because git status still displays the same as above.

What starts to be very strange for me is that deleting the local file and checking it out, still results in changes!?!?!

rm doc/pySPM\ Documentation.ipynb git checkout doc/pySPM\ Documentation.ipynb git status

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: doc/pySPM Documentation.ipynb 

A hard reset also don't help.

Is their some git expert around to spot the issue or have a clue for a solution?

My system is: Win64 with git v 2.17.1.windows.2 running is mingw64

1
  • Ok, what is already weird is that anybody cloning it: git clone https://github.com/scholi/pySPM.git, will clone it with a change for that file! How is that even possible? Commented Jun 18, 2018 at 15:12

1 Answer 1

1

Ok I have found it. I actually have a filter in my .gitconfig and somehow the file was commited without the cleaning filter. Now each time it is cloned, the file is changed due to the filter.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.