4

I have repository with one file with the local settings. I have added it to .gitignore and to .git/info/exclude but it was previously pushed to server and git wants to track them.

How to exclude this file?

Nips
  • 13,162
  • 23
  • 65
  • 103
  • Did you just want to remove the file so that it's no longer tracked in future commits, or did you want to remove the file from your repo's history entirely? –  May 09 '13 at 04:43

1 Answers1

6

you can delete that file from git's index by using git rm <filename> --cached

uday
  • 8,544
  • 4
  • 30
  • 54
  • 1
    Another option, if you want to keep the old version of the file on your repository without removing it, is `git update-index --assume-unchanged file.txt`. This is nifty if you want to leave a boilerplate file on the repository without having your real data there. For example, API keys, passphrases, usernames, etc. – skr1p7k1dd Nov 03 '17 at 23:37