How to ignore files in Git merge?

江枫思渺然 提交于 2019-12-03 00:23:34

git checkout master

git merge --no-log --no-ff --no-commit dev

git checkout master &ltfiles-you-don't-want-to-merge&gt


git add &ltfiles-you-don't-want-to-merge&gt

git commit -a

~~~ Test / Build ~~~

git push origin master 


ksimons

To be honest, git sounds like the wrong place to be solving this problem.

Django offers facilities for having separate settings/configuration for production and development environments. I suggest you take a look at this post: Django: How to manage development and production settings?

If you follow the advice in the post above, you can muck with the configuration, etc. for your dev environment and then merging to master will be harmless as production will have its own configuration.

It's been a long time. But I'm searching for a same solution. Out of nowhere, it just pops in my head: use a sub module for configurations. With a sub module, you can have multiple branches for different configurations.

Use symbolic links to link files from the sub module (in a sub directory).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!