11
9

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 2016-09-03

 経緯

.gitignoreファイルに設定していないのに、編集したファイルがsourcetreeの作業コピーにでてこないという事があった。解除方法が分からず、困ったのでメモとして書いとく。

 状況

編集したファイルをプッシュしようとsourcetreeにいったのですが、
スクリーンショット 2016-09-04 1.59.34.png
 となっていて、編集内容が反映されていなかった。
.gitignoreに設定した覚えもなく、編集が反映されない理由がわからなくて困り、調べてみると、
$ git status --ignored
このコマンドで、無視されているファイルを確認できるみたい。
確認してみると、確かに無視したくないファイルが一覧にありました。。。
しかし、解除方法がわからない。。。

解除方法

1、cdコマンドでホームディレクトリに移動
2、ls -a コマンドで、 .gitignore_globalファイルを探す
3、catコマンドで、.gitignore_globalの中身を確認
$cat .gitignore_global
すると、
$git status --ignored
で確認した一覧と同じ、無視されているファイルが表示されます。
そして、
4、vimコマンドで、.gitignore_globalファイルを編集し、無視したくないファイルをここから削除します。
これで、sourcetreeに編集内容が反映されるようになりました!!
スクリーンショット 2016-09-04 2.18.39.png

11
9
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
11
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?