I am working on a shared repository and I want to exclude all the files under certain directory just for myself.
So I made an entry in $GIT_ROOT/.git/info/exclude
/path/to/folder/
After this I removed the indexes using
git rm -r --cached /path/to/folder/*
A git status
after this show a long list of deleted file staged for commit.
I commit the changes and till here all is good as any changes made by me are not tracked by git. But I can not push the same to remote
as this will mess up other developers working repo.
After this If I pull from remote it shows me a merge conflict modified by them/deleted by us
. And with git reset --hard origin/<branch_name>
It starts tracking the folder again.
Can this not be achieved because I can not push to remote ?