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

[git] git reset hard originは万能ではない [自分メモ]

Last updated at Posted at 2017-10-30

git reset hard origin はいつ何時いかなる時も誰の干渉も受けずにとにかくremoteリポジトリの内容をローカルに適用するものだと勘違いしてた。

git fetch後じゃないと最新のremoteの情報に上書きされない。

当たり前といえば当たり前だが、勘違いしまくってたのでメモ。

git pull originするときは必ずgit fetchする癖はついてたのに...

git fetch -p
git reset hard origin/master
1
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
1
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?