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

git checkout HEAD~コマンド

0
Posted at

Gitの基本

Gitではファイルの変更を記録して履歴を残していく

A → B → C(今ここ)
Cが一番新しい状態。
Gitではこの最新のコミットをHEADと呼ぶ

git checkout HEAD ~1
上記を実行すると、1つ前のコミット時点のファイル状態に切り替わる。
➡ファイルが過去の状態に戻る。

git checkout HEAD ~2
➡2つ前のコミット時点のファイル状態に切り替わる。

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