I have repository my team works on in which there are some files that are tracked but may be changed locally like .exe file which is an effect of compilation but should be checked in only when release is done. Another is makefile.mk in which I set some local option and rarely make changes I need to commit. Usually this file is different from repository version ant this is OK. So these files are tracked, cannot be put into .gitignore
but make git pull origin
cry for overwriting changes to these files (error: Your local changes to the following files would be overwritten by merge). I tried to put *.exe~
into .git/info/exclude
(as well as the .mk) and run git update-index --no-assume-unchanged that.exe
so git status
no longer shows them but pulling still fails, even with -f
. I read somewhere to use git update-index --skip-worktree
an I tried. Now no one knows how to update my repo.
- How can I keep modified files which are tracked and make GIT ignore their changes locally?
- How could I repair my repository without cloning it (I'd miss some config files for example)?