LoginSignup
7
1

More than 1 year has passed since last update.

【Githubエラー】you need to resolve your current index first

Posted at

状況

ブランチを切り替えようと思ったら下記のエラー

error: you need to resolve your current index first

解決法

%  git reset --merge

--mergeオプション

インデックスをリセットし、commitとHEADの間で異なるワークツリー内のファイルを更新しますが、インデックスとワークツリー間で異なるファイル(つまり、変更が追加されていないファイル)は保持します。commitとインデックスの間で異なるファイルにステージングされていない変更がある場合、リセットは中止されます。

参考

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