1
2

More than 3 years have passed since last update.

git pull出来ないときの対処法

Posted at

個人開発を進めて行く中で、git pullできないことがありました。

$ git pull

試したこと

git stashコマンドを入力。
(変更しているファイルすべてを別の場所に保存しておいて一時的に変更していない状態に戻す)

$ git stash

このコマンドを実行すると無事git pullできました。


ちなみに

$ git stash list

上記のコマンドで、一時的に保存したリストを確認できます。

$ git stash list
stash@{0}: WIP on follow_unfollow: 1ef591e fix users controller

以下のコマンドで、退避していたスタッシュを元に戻せます。

$ git stash pop

終わり。

本番環境でpullしたらコンフリクト?解決法3パターン!【Please commit your changes or stash them before you merge】

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