LoginSignup
0
0

More than 1 year has passed since last update.

SourceTree(ソースツリー)| reflog(リフログ)| ログを参照する

Last updated at Posted at 2022-07-01

reflog(リフログ)とは

reference + log = ログを参照する

レポジトリ内で行われた全てのコマンドの履歴を参照する

  • コミット(コミット、マージ、プル、リバート)
  • 書き換え(リセット、リベース)
  • ブランチ切り替え(チェックアウト)

コマンドでのやり方

注意:SourceTree ではできないのでコマンドを使用

git reflog

ログの見方

①コミット番号 ②(参照名) ③HEAD@{n}: ④Gitコマンド: ⑤処理内容

c1234567 (HEAD -> develop) HEAD@{0}: checkout: moving from master to develop

NEXT ACTION

特定の時点まで戻す

nに戻りたい地点の数字を入力

git reset --hard HEAD@{n}
または
git reset --hard @@{n}

参考

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