R
R
ramntry2013-12-02 21:50:29
git
ramntry, 2013-12-02 21:50:29

How to exclude some files in a git repository from being affected by the -a option of a commit command?

There are files in the remote repository that should be stored there, but should never change. However, they are automatically changed while working in the local repository. As a result, git in response to the status command honestly indicates that they have been changed and the changes are unstaged. These changes cannot be committed, so I am deprived of the ability to use commit -a for all other files, which is convenient. Including these files in .gitignore does not help in any way.
How can I force git to still version files, but not keep track of the difference between their current state and the state in the staged-area?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2013-12-02
@ramntry

The official manual recommends git update-index --assume-unchanged

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question