我在CodeIgniter站点中有几个文件,我希望在仓库中拥有这些文件,但不会跟踪任何更改。例如,我将此框架的新安装部署到新客户端,我想要下载以下文件(它们具有默认值CHANGEME),并且我只需对此客户端进行特定更改(数据库凭证,电子邮件地址信息,自定义CSS)。将文件保存在Git仓库中,但不要跟踪更改
// the production config files i want the files but they need to be updated to specific client needs
application/config/production/config.php
application/config/production/database.php
application/config/production/tank_auth.php
// index page, defines the environment (production|development)
/index.php
// all of the css/js cache (keep the folder but not the contents)
/assets/cache/*
// production user based styling (color, fonts etc) needs to be updated specific to client needs
/assets/frontend/css/user/frontend-user.css
目前,如果我跑
git clone [email protected]:user123/myRepo.git httpdocs
,然后编辑上面的文件,所有是伟大的。直到我发布修补程序或修补程序并运行git pull
。我的所有更改都将被覆盖。
可能重复[Git:文件必须分布,但忽略/不重新上传?](http://stackoverflow.com/questions/5586267/git-file-that-must-be-distributed-but-ignored-not-reuploaded) – Daenyth 2012-03-21 04:07:46
[git:我可以提交文件并忽略内容更改?](http://stackoverflow.com/questions/3319479/git-can-i-commit-a-file-and-ignore-the-content-changes) – CharlesB 2012-03-25 09:36:02
可能重复的[git:我可以提交一个文件和忽略内容更改?](http://stackoverflow.com/questions/3319479/git-can-i-commit-a-file-and-ignore-the-content-changes) – 2017-03-23 08:36:45