Pierre
Pierre

Reputation: 5156

git: how to "retrack" untracked file

I'm fairly new to git...

I untracked a file doing:

git update-index --assume-unchanged filename

Now I want to commit a change on this file, but I can't figure out how to remove the untrack. I tried git add filename and git update-index --add filename thinking it was the way but it doesn't seem to work...

What's the command for this? I searched in the documentation and on the net, and maybe I just didn't use the right words... but I didn't find what I was looking for... I find git's documentation fairly hard to use as a newbie...

Thanks!

Upvotes: 11

Views: 6929

Answers (1)

manojlds
manojlds

Reputation: 301127

Simple:

git update-index --no-assume-unchanged filename

I don't know where you were looking, but both the flags are grouped together in the documentation:

http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

Upvotes: 15

Related Questions