File not ignore not excluded not assumed unchanged Git -
there's configuration file want out of projects not have permanent conflicts co-workers.
at first put in .gitignore , worked fine, being ignored wasn't on server , had rewrite changed branches or pulles since deleted every once in while.
so read man more , started using exclude , worked fine, 2 hours, pushed, pulled , file modified over. it's not excluded anymore , shows everytime change in tracked files.
so, tried index --assume-unchanged worked until pulled, won't let me change branches telling me have conflict.
every if try checkout file or remove git tell me
unable .... name/of/the/file what on earth doing wrong? other files either exclude or ignore ignore or excluded correctly.
the reason file keeps showing coworkers not ignoring it.
if you're going ignore files in git, have make sure agrees on ignored; it's impossible (or @ least extremely difficult) have different ignore rules on different clones of shared repo.
the procedure ignoring already-committed file:
- remove file repo:
git rm --cached /path/to/myfile - commit.
- add file
.gitignore - add
.gitignorerepo if isn't already - commit , push.
now, when coworkers merge changes, these 2 commits remove config file repo leave actual file intact on systems, , ensure file in .gitignore future commits not add config file repo.
Comments
Post a Comment