Is the "supposed unchanged" information communicated?

There is a specific file that I want to provide in its current state, but I do not want any further changes to be made. Thus, I have done "no change" in this file. Now git is ignoring changes to this file in my repository. But what about other users of the repository - will they have to do "assume-immutable" for this file in their own repository?

Is there a way to automatically make the "assume-no change" directive valid for other users, as is done with "gitignore" information?

+3


source to share


1 answer


No, it git update-index --assume-unchanged

only updates the index of your local repo.

Not an index of any other remote repo and this is not pushed.
it will be the same forgit update-index --skip-worktree

One approach that can be shifted is to use a content filter driver to generate the actual file from the versioned template.
See for example, Automatically ignore selected code changes when pushed to repository git -hub "



http://i.stack.imgur.com/77Oy5.png

(image from Customizing Git Attributes "from the Git Book )

+3


source







All Articles