reflog
NAME名
git-reflog - Manage reflog informationgit-reflog - reflog情報を管理する
SYNOPSIS概要
git reflog <subcommand> <options>
DESCRIPTION説明
The command takes various subcommands, and different options depending on the subcommand:このコマンドはさまざまなサブコマンドと、サブコマンドに応じて異なるオプションを取ります。
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>
Reference logs, or "reflogs", record when the tips of branches and
other references were updated in the local repository. Reflogs are
useful in various Git commands, to specify the old value of a
reference. For example, HEAD@{2}
means "where HEAD used to be two
moves ago", master@{one.week.ago}
means "where master used to point
to one week ago in this local repository", and so on. See
gitrevisions[7] for more details.参照ログ( "reflogs")は、ブランチのヒントやその他の参照がローカルリポジトリで更新された日時を記録します。reflogはさまざまなGitコマンドで参照の古い値を指定するのに役立ちます。たとえば、HEAD@{2}
「以前はHEADが2手前だったmaster@{one.week.ago}
場所」、「このローカルリポジトリでmasterが1週間前を指していた場所」などを意味します。詳細はgitrevisions [7]を見てください。
This command manages the information recorded in the reflogs.このコマンドは、reflogに記録されている情報を管理します。
The "show" subcommand (which is also the default, in the absence of
any subcommands) shows the log of the reference provided in the
command-line (or HEAD
, by default). The reflog covers all recent
actions, and in addition the HEAD
reflog records branch switching.
git reflog show
is an alias for git log -g --abbrev-commit
--pretty=oneline
; see git-log[1] for more information."show"サブコマンド(サブコマンドがない場合はこれもデフォルトです)は、コマンドラインで(またはHEAD
デフォルトで)提供されている参照のログを表示します。reflogは最近のすべてのアクションを網羅し、さらにHEAD
reflogはブランチの切り替えを記録します。;のgit reflog show
エイリアスですgit log -g --abbrev-commit --pretty=oneline
。詳しくはgit-log [1]を見てください。
The "expire" subcommand prunes older reflog entries. Entries older
than expire
time, or entries older than expire-unreachable
time
and not reachable from the current tip, are removed from the reflog.
This is typically not used directly by end users — instead, see
git-gc[1]."expire"サブコマンドは古いreflogエントリを整理します。expire
時間より古いエントリ、または時間より古いエントリでexpire-unreachable
現在のチップから到達できないエントリは、reflogから削除されます。これは通常、エンドユーザによって直接使用されることはありません - 代わりに、git-gc [1]を参照してください。
The "delete" subcommand deletes single entries from the reflog. Its
argument must be an exact entry (e.g. "git reflog delete
master@{2}
"). This subcommand is also typically not used directly by
end users."delete"サブコマンドはreflogから単一のエントリを削除します。その引数は正確なエントリ(例: " git reflog delete master@{2}
")でなければなりません。このサブコマンドは通常、エンドユーザーが直接使用することもありません。
The "exists" subcommand checks whether a ref has a reflog. It exits with zero status if the reflog exists, and non-zero status if it does not."exists"サブコマンドは、refにreflogがあるかどうかを調べます。reflogが存在する場合は0のステータスで、存在しない場合は0以外のステータスで終了します。
OPTIONSオプション
Options for show
のオプション show
git reflog show
accepts any of the options accepted by git log
.git reflog show
で受け入れられているオプションのどれでも受け入れますgit log
。
Options for expire
のオプション expire
- --all - すべて
-
Process the reflogs of all references.すべての参照のreflogを処理します。
- --single-worktree - シングルワークツリー
-
By default when
--all
is specified, reflogs from all working trees are processed. This option limits the processing to reflogs from the current working tree only.--all
が指定されている場合のデフォルトでは、すべての作業ツリーからのreflogが処理されます。このオプションは、現在の作業ツリーからのみ再ログするように処理を制限します。 - --expire=<time> --expire = <time>
-
Prune entries older than the specified time. If this option is not specified, the expiration time is taken from the configuration setting
gc.reflogExpire
, which in turn defaults to 90 days.--expire=all
prunes entries regardless of their age;--expire=never
turns off pruning of reachable entries (but see--expire-unreachable
).指定した時間よりも古いエントリを整理します。このオプションが指定されていない場合、有効期限は構成設定から取得されます。構成設定のgc.reflogExpire
デフォルトは90日です。--expire=all
年齢に関係なくエントリーを整理します。--expire=never
到達可能なエントリの枝刈りを無効にします(参照--expire-unreachable
)。 - --expire-unreachable=<time> --expire-unreachable = <時間>
-
Prune entries older than
<time>
that are not reachable from the current tip of the branch. If this option is not specified, the expiration time is taken from the configuration settinggc.reflogExpireUnreachable
, which in turn defaults to 30 days.--expire-unreachable=all
prunes unreachable entries regardless of their age;--expire-unreachable=never
turns off early pruning of unreachable entries (but see--expire
).<time>
それより古いエントリを削除すると、ブランチの現在のチップから到達できなくなります。このオプションが指定されていない場合、有効期限は構成設定から取得されます。構成設定のgc.reflogExpireUnreachable
デフォルトは30日です。--expire-unreachable=all
年齢に関係なく、到達不可能なエントリを整理します。--expire-unreachable=never
到達不可能なエントリの早期整理を無効にします(ただし参照--expire
)。 - --updateref
-
Update the reference to the value of the top reflog entry (i.e. <ref>@{0}) if the previous top entry was pruned. (This option is ignored for symbolic references.)前のトップエントリが整理された場合は、トップのreflogエントリの値(つまり<ref> @ {0})への参照を更新します。(このオプションはシンボリック参照では無視されます。)
- --rewrite - リライト
-
If a reflog entry’s predecessor is pruned, adjust its "old" SHA-1 to be equal to the "new" SHA-1 field of the entry that now precedes it.reflog項目の先行操作が整理された場合は、その「古い」SHA-1を、その項目の「新しい」SHA-1フィールドと同じになるように調整します。
- --stale-fix
-
Prune any reflog entries that point to "broken commits". A broken commit is a commit that is not reachable from any of the reference tips and that refers, directly or indirectly, to a missing commit, tree, or blob object.「破損したコミット」を指すreflogエントリを整理します。壊れたコミットとは、どの参照先のヒントからも到達できず、直接的または間接的に、欠落しているコミット、ツリー、またはBLOBオブジェクトを指すコミットです。
This computation involves traversing all the reachable objects, i.e. it has the same cost as git prune. It is primarily intended to fix corruption caused by garbage collecting using older versions of Git, which didn’t protect objects referred to by reflogs.この計算はすべての到達可能なオブジェクトをトラバースすることを含みます、すなわちそれはgit pruneと同じコストを持ちます。これは主に、reflogで参照されるオブジェクトを保護しない、古いバージョンのGitを使用してガベージコレクションによって引き起こされる破損を修正することを目的としています。
- -n
- --dry-run
-
Do not actually prune any entries; just show what would have been pruned.実際にエントリを整理しないでください。切り取られたはずのものを表示するだけです。
- --verbose - 冗談
-
Print extra information on screen.画面に追加情報を印刷します。
Options for delete
のオプション delete
git reflog delete
accepts options --updateref
, --rewrite
, -n
,
--dry-run
, and --verbose
, with the same meanings as when they are
used with expire
.git reflog delete
オプションを受け付け--updateref
、--rewrite
、-n
、--dry-run
、および--verbose
それらが一緒に使用されたときと同じ意味で、expire
。
GIT
Part of the git[1] suite一部のgit [1]スイート
関連記事
- write-tree
- verify-pack
- update-ref
- update-index
- symbolic-ref
- show-ref
- rev-parse
- rev-list
- read-tree
- merge-base
- ls-files
- hash-object
- for-each-ref
- diff-index
- count-objects
- commit-tree
- checkout-index
- check-ignore
- cat-file
- bundle
- archive
- instaweb
- filter-branch
- fsck
- gc
- clean
- Workflows
- Tutorial
- Revisions
- gitmodules
- gitignore
- githooks
- Glossary
- Everyday Git
- gitattributes
- update-server-info
- daemon
- fast-import
- svn
- request-pull
- send-email
- format-patch
- am
- grep
- blame
- bisect
- revert
- rebase
- cherry-pick
- apply
- describe
- shortlog
- show
- submodule
- remote
- push
- pull
- fetch
- worktree
- tag
- stash
- log
- mergetool
- merge
- checkout
- branch
- mv
- rm
- reset
- commit
- diff
- status
- add
- clone
- init
- help
- config
- git
スポンサーリンク