LoginSignup
0
0

.gitignore の記載を変更しても反映されない

Last updated at Posted at 2021-11-25

目的

  • すでにgit管理されているファイルをgitignoreファイルに登録したが反映されなかったので自分用のメモとして残す。

概要

  • gitignoreファイルと同じ階層にあるs3ディレクトリ配下をすべてgit管理から外したい。

方法

  1. .gitignoreファイルへの記載
    1. .gitignoreファイルに下記のように記載を行った。

      .gitignore
      /s3/
      
  2. キャッシュの削除
    1. 下記コマンドを実行してgit管理から除外したファイルキャッシュを削除した。

      $ git rm -r --cached s3/*
      
    2. 後は差分が出ているファイルをaddしてcommitしたら作業完了

参考文献

0
0
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
0
0