Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git update-index --no-assume-unchanged doesn't work

Tags:

git

I set the assume-unchanged bit on a couple of files, and now I want to unset them, but that doesn't work.

> git update-index --no-assume-unchanged Gemfile
> git ls-files -v | grep Gemfile
S Gemfile
S Gemfile.lock
> git status
# On branch foo
nothing to commit (working directory clean)
> 

I have changes in my Gemfile of course. Some of them I don't want to commit, others I do. And if anyone else changes Gemfile, I can't merge because of that bit. It really seems to mess a bit too much stuff up.

So I have two questions:

1: How do I unset the bit? 2: Is there a better way to ignore one specific local change, while allowing other changes to that file to work normally?

like image 533
mcv Avatar asked Aug 01 '12 09:08

mcv


1 Answers

A bit late maybe but I was facing the same problem as you and I solved it by using the --really-refresh flag

like so :

git update-index  --really-refresh --no-assume-unchanged Gemfile

Hope this works for you

Post edit :

It can be done apparently in 2 steps if you have multiple files

 git update-index  --really-refresh
 git update-index --no-assume-unchanged Gemfile
like image 74
ufasoli Avatar answered Sep 21 '22 12:09

ufasoli