Can I 'git commit' a file and ignore its content changes?

前端 未结 4 964
抹茶落季
抹茶落季 2020-11-22 07:17

Every developer on my team has their own local configuration. That configuration information is stored in a file called devtargets.rb which is used in our rake

4条回答
  •  忘掉有多难
    2020-11-22 07:40

    Common practice seems to be to create a devtargets.default.rb and commit it, and then instruct each user to copy that file to devtargets.rb (which is on the .gitignore list). For example, CakePHP does the same for its database configuration file which naturally changes from machine to machine.

提交回复
热议问题