5
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 3 years have passed since last update.

Docker環境構築後にVS Codeで「The git repository at 'Appディレクトリ' has too many active changes, only a subset of Git features will be enabled.」に見舞われる

Last updated at Posted at 2021-03-15

環境

Ruby on Rails 6.0.3
ruby 2.6.3
MacOS Catalina 10.15.7

困ったこと

ローカルでVS CodeでDockerのコンテナ作りをしていたら、VS CodeのメニューバーのSource Control(編集したファイルの変更前後を表示してくれるナイスなやつ)が5k+になって、そのうちgitが壊れました。

それからというもの画面右下に下記メッセージが表示されるようになりました。

The git repository at 'Appディレクトリ' has too many active changes, only a subset of Git features will be enabled.

(意訳:gitリポジトリの変更が多すぎるから、一部のgit機能しか使えなくなってるよ。)

スクリーンショット 2021-03-15 11.03.07.png

そして、左のメニューバーの編集したファイルの差異を示してくれる箇所が時計マークでワークしなくなり、左下にgitのブランチ名を表示してくれなくなりました。。。VS codeを再起動しても変わらずです。

スクリーンショット 2021-03-15 11.54.34.png

実はこの問題に見舞われるのは2度目なのですが、1度目どう解決したかメモしておらず(LaravelのプロジェクトをGitHubにアップするのに試行錯誤した話)、ネットにもあまり情報がなく困り果てており、もうこのアプリではVS Codeのこの機能は諦めて全てターミナルでgit statusして凌ぐか...と思っていた矢先、弊社の最強先輩陣が助けてくれました。

解決

vendor/bundleを.gitignoreに含めてコミットしたら直りました!

このディレクトリはbundleをinstallする場所。
Dockerの環境構築した時に、5k以上のファイルがここにインストールされてしまったのかなと推察しております。

too many changes(変更が多すぎる)ということで怒られているので、.gitignoreが適切に設定されているかを疑うのがいいのかもしれません。

先輩方(@yuuu @yuka)の方向に足を向けて寝られません。

5
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
5
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?