I need to make changes in files, which are in remote repositories locally and make git ignore those changes when I do git commit
/git push
.
There are already answers for that: https://stackoverflow.com/a/1753078/747050 https://stackoverflow.com/a/13631525/747050 All of them tell to use
git update-index --skip-worktree <file-name>
When I execute this command and change the file, and then switch the branch git switch master
I get an error:
error: Your local changes to the following files would be overwritten by checkout:
<file-name>
Please commit your changes or stash them before you switch branches.
Neither editing .git/info/exclude
file nor git update-index --assume-unchanged
doesn't help.