Reverse .stignore to refuse changes from others?

Suppose I’m sharing a repository with others, and I want to do one of the following:

  1. There’s a particular file or directory that I want to change, and I don’t want my changes uploaded to others, but I also don’t want others’ changes to override mine. I want the file to stay out of sync.
  2. There’s a file that I want to keep exactly the way it is, but I fear that someone else might change it.
  3. There’s a very large file or subfolder that I’m not interested in, and I want to delete it to save space, and not have it come back.

Cases 1 and 2 can be worked around by simply making a copy of the files outside of the repository, and case 3 can be worked around by creating multiple repositories and getting everyone involved to switch to this more complicated sharing model.

But all of these could be solved more elegantly by allowing a user to not apply changes received from peers - basically like .stignore, but in reverse. Is anything like this planned, or is there a way to do it now that I’m not familiar with?

.stignore currently does this; it ignores incoming changes for the matched files/directories, as well as the local files.

1 Like