Let's say I have a repo that looks like this:
Repo
--a.txt
--b.txt
Let's say I create a feature branch named featureA
for user A
to implement a feature. After implementing feature branch would be merged back to master
.
Now I want User A
to work only with b.txt
to implement the feature and not change a.txt
but as far as I have seen user can change a.txt
. So how do I restrict the user from changing a.txt
? Also, I want a.txt
to be in user's copy but I don't want the user to change it. Can this be done in Git
or SourceTree
?
Git's submodule is the one you need:
different_repo
lol.a.txt
to different_repo
.different_repo
to your current repo as a submodule.different_repo
to read-only to some of your users.