Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: how to "retrack" untracked file

Tags:

git

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!

like image 375
Pierre Avatar asked Feb 02 '23 18:02

Pierre


1 Answers

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

like image 56
manojlds Avatar answered Feb 05 '23 07:02

manojlds