github - gitignore file does not ignores and git rm actually removes the files -
so finding solution wherein .gitignore should ignore files tell to. turns out if have committed them, .gitignore file doesn't matter. suggested solution git rm filename. problem is, there repo want contribute to, had committed initial files. added few file names want gitignore in .gitignore , committed pushed , pull request merged. i'm making changes 1 of gitignore files, when git status says modifies(expected). git rm index.php , file deleted. should not solution, right? should delete commit , force pull it? gone then. sure doing wrong. help welcomed. p.s. read git ready link doing assume unchanged everytime, not feasible.
my gitignore file looks this:
/index.php /assets/* /protected/config/* /protected/runtime/* *~ [#]*[#]
i think need
$ git update-index --assume-unchanged config_file
instead of modifying .gitignore
file ignore them.
by way, can maintain files there changes made ignored. when need modify it, use
$ git update-index --no-assume-unchanged config_file
to re-track file. can commit modification on config_file
.
i think improve way manage configuration related files. .gitignore
improve temporally files. :)
git github yii
No comments:
Post a Comment