3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【rails5】database.ymlをgitの管理下から外す方法

Last updated at Posted at 2019-02-13

database.ymlをgitの管理下から外す方法

git ignoreファイルの開き方

vi .gitignore
普段見えない。

1,リポジトリにアップしないようにする

gitignore内に

Ignore uploaded files in development
/config/database.ymlと記載

2,一度gitの管理下に入れてれば除外する

configディレクトリまでいって打つ事
git rm --cached database.yml

この2つやってからコミットしてプッシュする。

リポジトリを確認すると、database.ymlはプッシュされていない。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?