LoginSignup
306
233

More than 5 years have passed since last update.

git管理している途中から.gitignoreを追加して、その設定を反映させる方法

Last updated at Posted at 2015-02-12

.gitignoreとは

Gitのバージョン管理対象から外すファイルを指定できる設定ファイルのこと

本題

Git管理をしている状態で、
途中から「.gitignore」に除きたいファイルを追加しても
既に管理対象に追加されているためそのままだと.gitignoreされない

そこでする作業は以下
git rm -r --cached .

あとはいつも通りgit add、git commit、git pushをすればok

※参考URL
http://qiita.com/Potof_/items/c75eba9cfa72819506de

306
233
1

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
306
233