2
1

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.

🌴【SourceTree】作業ツリーのファイルを無視したいのに無視が選択できないのはソース管理されているから

Last updated at Posted at 2019-12-22

環境

Windows 10
SourceTree 3.3.4
git version 2.24.1.windows.2

やりたいこと

無視したいファイルがあるのに無視できない...
.gitignoreに書いても意味無し...何故?

sourcetree.jpg

やったこと

解決法は単純極まりないです
対象がソース管理下のファイルだったので管理から外すと無視設定できました


対象ファイルを右クリックし表示されるメニュー(上記やりたいこと参照)から
「追跡をやめる」→削除しますか?ダイアログの「OK」

sourcetree2.jpg

(削除の文言が怖いですがファイルは残っています)

Indexにステージしたファイルにアイナス表記で対象ファイルが表示され、
作業ツリーには疑問符表記で同ファイルがあるのでソース管理から外れた状態になっている

対象ファイルをコミットして削除コミットを作成
コメントには管理から外した旨を書いていればいいかと

無視が選択できるようになっている

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?