1

I changed a tracked file.

I then marked the file with --assume-unchanged flag.

I ran git stash save, but nothing stashed.

How to stash save assume changed file?

Ofir Farchy
  • 7,657
  • 7
  • 38
  • 58
linquize
  • 19,828
  • 10
  • 59
  • 83

2 Answers2

3

I guess that you have run

git update-index --assume-unchanged <file>

And it looks like you will have to add it to index again before stash it.

git update-index --no-assume-unchanged <file>
lars
  • 2,015
  • 1
  • 14
  • 8
0

You should try and run git stash before marking it "--assume-unchanged".
Or at least mark it "--no-assume-unchanged" before stashing it.

(unless you are talking about two different files, and your question is about the side effect of marking one file "unchanged" and seeing the other file not picked up by the stash).


Note that git stash has been ported to C since 2013, and using Git 2.24+ (Q4 2019) is advisable.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250