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は最近のすべてのアクションを網羅し、さらにHEADreflogはブランチの切り替えを記録します。;の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 setting gc.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]スイート

関連記事

スポンサーリンク

word-spacing 単語の間隔を指定する

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る