0

I commited a basic version (without passwords etc.) of my config-file to a git repo. Now I want it to not show up below "changes not staged for commit" as modified anymore so I can just use git add * without worrying that I commit my user-data.

Adding the file in question to .gitignore didn't help.

Florian Neumann
  • 5,069
  • 1
  • 39
  • 47
Hedge
  • 14,995
  • 36
  • 132
  • 233
  • 1
    possible duplicate of [Git: Ignore tracked files](http://stackoverflow.com/questions/10755655/git-ignore-tracked-files). The short answer is "don't do that" (both trying to get git to ignore modified files; and `git add *`) – AD7six May 12 '14 at 11:38

1 Answers1

1

Try git update-index --assume-unchanged <path>.

But it's important to note, that a hard reset will revert this (stash for example makes a hard reset).

Sascha Wolf
  • 17,034
  • 4
  • 47
  • 72