git update-index --assume-unchanged and git reset git update-index --assume-unchanged and git reset git git

git update-index --assume-unchanged and git reset


You can do:

git update-index --skip-worktree A


You need to add a .gitignore file entry for those files if you want to ignore them. Add just the .gitignore file, commit it and you will now ignore any changes to them.

However, I think you need to tell us why you are doing it, what's the contents of the files, the nature of them (are they artifacts?) - then you'll get the proper answer.

Also, update-index with the assume-unchanged is meant to be used to increase performance if your tree on your OS's file system takes a long time to gather changes for a particular path. I would not recommend using it in your case unless you are ignoring those files due to lengthy git status or git diff or other command execution times.


You could use

$ git stash$ git reset --hard$ git stash pop