Reputation: 4429
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?
Upvotes: 6
Views: 4310
Reputation: 1068
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
Upvotes: 10