IT系/リファレンス/Gitコマンド/git_reflog

Last-modified: 2020-06-12 (金) 18:02:23

git reflog

HEADやブランチの動きの履歴を表示するコマンド。

用例

  • HEADやブランチの動きの履歴を表示
    git reflog
  • HEADやブランチの動きの履歴を全て表示
    git reflog --all

書式

git reflog [subcommand] [options]

公式によると以下の通り。

git reflog [show] [log-options] [<ref>]
git reflog expire [--expire=<time>] [--expire-unreachable=<time>]
                  [--rewrite] [--updateref] [--stale-fix]
                  [--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>…]
git reflog delete [--rewrite] [--updateref]
                  [--dry-run | -n] [--verbose] ref@{specifier}…
git reflog exists <ref>

options

/xxxx

etc.

説明

HEADやブランチの動きの履歴を表示するコマンド。

  • 履歴に表示される「HEAD@{0}」のような表記は、コミットIDと同じようにそのままgit diff やgit resetコマンドなどで使用できる。

関連

参考リンク

その他メモ

なにかあれば。