0
0

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 1 year has passed since last update.

【備忘録】.gitignoreに追記した後にGitの管理下に入ってしまう場合

Posted at

.gitignoreに自分用のメモを記入していた「memo.txt」というファイルを追記したのですが、gitの管理下に入ってしまうという問題に直面しました。
以下の方法でgit管理下から除外できました。

まず以下のコマンドを試す。

git rm --cached memo.txt

それでも解決しない場合は次を試す。

git rm -r --cached .
git add .

以上の方法で.gitignoreへの追記が反映できました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?