gitignore中的文件 [英] Files in gitignore

查看:181
本文介绍了gitignore中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在生产服务器上有一个rails应用程序库。



在repo中有.gitignore文件:

  ... 
config / database.yaml
...

每个开发客户端都有一个带有不同config / database.yaml的克隆回购。



我的问题是: p>

database.yaml在.gitignore中,然后当我运行git clone(在服务器上)时,database.yaml不会被创建,但我需要它。



我以为我做错了什么。
您能看到我的错误在哪里吗?

谢谢,
Alessandro

解决方案

在我的项目中,我通常在database.example.yml中创建可用数据库配置的副本,然后当有人克隆项目时,将database.example.yml复制到database.yml并进行必要的更改。


I have a repository with a rails app in the production Server.

In the repo there is the .gitignore file:

...
    config/database.yaml 
...

Every developing client have a cloned repo with different config/database.yaml.

My problem is this:

database.yaml is in .gitignore, then when I run git clone (on the server) the database.yaml will not be created, but I need it.

I thought than I am doing wrong something. Can you see where is my mistake ?

thank you, Alessandro

解决方案

In my projects, I usually make a copy of a usable database config in a database.example.yml, then when someone clones the projects, copy the database.example.yml to database.yml and make the needed changes.

这篇关于gitignore中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆