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,587
  • 1
  • 39
  • 48
Hedge
  • 16,142
  • 42
  • 141
  • 246
  • 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
  • 18,810
  • 4
  • 51
  • 73