0

I was tracking a file in git, but don't want to track it anymore

± |master ↑1 ?:1 ✗| → git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    data/foo.txt

nothing added to commit but untracked files present (use "git add" to track)

± |master U:1 ?:1 ✗| → git update-index --assume-unchanged data/foo.txt
fatal: Unable to mark file data/foo.txt

± |master U:1 ?:1 ✗| → git rm --cached data/foo.txt
fatal: pathspec 'data/foo.txt' did not match any files

How do I convince git to ignore data/foo.txt?

punkish
  • 13,598
  • 26
  • 66
  • 101
  • 2
    Do you know about `.gitignore`? – Leon Oct 12 '16 at 09:20
  • 1
    hmm, thanks. Didn't occur to me to add data/foo.txt to .gitignore. Did, and now it is ignored, eh! Thanks. – punkish Oct 12 '16 at 09:38
  • 1
    Possible duplicate of [How to ignore certain files in git?](http://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git) – Melebius Oct 12 '16 at 09:40

0 Answers0