status

NAME

git-status - Show the working tree statusgit-status - 作業ツリーの状態を表示する

SYNOPSIS概要

git status [<options>…​] [--] [<pathspec>…​]

DESCRIPTION説明

Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by gitignore[5]). The first are what you would commit by running git commit; the second and third are what you could commit by running git add before running git commit.インデックスファイルと現在のHEADコミットとの間に相違があるパス、作業ツリーと索引ファイルとの間に相違があるパス、およびGitによって追跡されない(そしてgitignoreによって無視されない[5]作業パス内のパス)最初は、あなたが何をしているでしょう実行してコミットgit commit。2番目と3番目は、実行する前にgit addを実行してコミットできるものです。git commit

OPTIONSオプション

-s
--short - ショート

Give the output in the short-format.出力を短形式で渡します。

-b
--branch - ブランチ

Show the branch and tracking info even in short-format.短い形式でも分岐と追跡情報を表示します。

--show-stash - ショースタッシュ

Show the number of entries currently stashed away.現在隠してあるエントリーの数を表示します。

--porcelain[=<version>] --porcelain [= <version>]

Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details.スクリプト用の解析しやすい形式の出力を指定してください。これは短い出力と似ていますが、Gitのバージョン間でもユーザー設定に関係なく安定しています。詳細は下記をご覧ください。

The version parameter is used to specify the format version. This is optional and defaults to the original version v1 format.versionパラメータは、形式のバージョンを指定するために使用されます。これはオプションで、デフォルトはオリジナルバージョンのv1フォーマットです。

--long - 長いです

Give the output in the long-format. This is the default.長形式で出力してください。これがデフォルトです。

-v
--verbose - 冗談

In addition to the names of files that have been changed, also show the textual changes that are staged to be committed (i.e., like the output of git diff --cached). If -v is specified twice, then also show the changes in the working tree that have not yet been staged (i.e., like the output of git diff).変更されたファイルの名前に加えて、コミットされるように段階的に変更されたテキストの変更も表示します(つまり、の出力のようにgit diff --cached)。-vが2回指定されている場合は、まだステージされていない作業ツリー内の変更も表示します(つまり、の出力のようにgit diff)。

-u[<mode>] -u [<モード>]
--untracked-files[=<mode>] --untracked-files [= <mode>]

Show untracked files.追跡されていないファイルを表示します。

The mode parameter is used to specify the handling of untracked files. It is optional: it defaults to all, and if specified, it must be stuck to the option (e.g. -uno, but not -u no).modeパラメータは、追跡されていないファイルの処理を指定するために使用されます。これはオプションです。デフォルトはallです。指定されている場合は、オプションに固定されている必要があります(-unoそうではありません-u no)。

The possible options are:可能なオプションは以下のとおりです。

  • no - Show no untracked files.no - 追跡されていないファイルを表示しません。

  • normal - Shows untracked files and directories.normal - 追跡されていないファイルとディレクトリを表示します。

  • all - Also shows individual files in untracked directories.all - 追跡されていないディレクトリ内の個々のファイルも表示します。

When -u option is not used, untracked files and directories are shown (i.e. the same as specifying normal), to help you avoid forgetting to add newly created files. Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree. Consider enabling untracked cache and split index if supported (see git update-index --untracked-cache and git update-index --split-index), Otherwise you can use no to have git status return more quickly without showing untracked files.この-uオプションを使用しない場合は、追跡されていないファイルとディレクトリが表示され(つまり、指定と同じnormal)、新しく作成されたファイルを追加するのを忘れないようにします。ファイルシステムで追跡されていないファイルを見つけるには余分な作業が必要なので、このモードでは大きな作業ツリーで時間がかかることがあります。(参照サポートされている場合人跡未踏のキャッシュとスプリット指標を有効にすることを検討git update-index --untracked-cacheし、git update-index --split-indexそうでない場合は、使用することができ、)no持つようにgit status追跡されていないファイルを表示せずに、より迅速にリターンを。

The default can be changed using the status.showUntrackedFiles configuration variable documented in git-config[1].デフォルトはgit-config [1]に書かれているstatus.showUntrackedFiles設定変数を使って変更することができます。

--ignore-submodules[=<when>] --ignore-submodules [= <when>]

Ignore changes to submodules when looking for changes. <when> can be either "none", "untracked", "dirty" or "all", which is the default. Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the ignore option in git-config[1] or gitmodules[5]. When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content). Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior before 1.7.0). Using "all" hides all changes to submodules (and suppresses the output of submodule summaries when the config option status.submoduleSummary is set).変更を探すときにサブモジュールへの変更を無視します。<when>は、 "none"、 "untracked"、 "dirty"、または "all"のいずれかです。これがデフォルトです。noneを使用すると、追跡されていないファイルまたは変更されたファイルが含まれている場合、またはそのHEADがスーパープロジェクトに記録されたコミットと異なる場合に変更されたサブモジュールが考慮されます。git -config [1]またはgitmodules [ 1]ignoreオプションの設定を上書きするために使用できます。 5]。「追跡されていない」が使用されている場合、サブモジュールは追跡されていないコンテンツのみを含む場合はダーティとは見なされません(ただし、変更されたコンテンツについてはスキャンされます)。"dirty"を使用すると、サブモジュールの作業ツリーに対するすべての変更が無視され、スーパープロジェクトに格納されているコミットに対する変更のみが表示されます(これは1.7.0より前の動作でした)。"all"を使用すると、サブモジュールへのすべての変更が隠されます(そして、configオプションstatus.submoduleSummaryが設定されている場合はサブモジュールの要約の出力が抑制されます)。

--ignored[=<mode>] --ignored [= <モード>]

Show ignored files as well.無視されたファイルも表示します。

The mode parameter is used to specify the handling of ignored files. It is optional: it defaults to traditional.modeパラメータは、無視されるファイルの取り扱いを指定するために使用されます。これはオプションである:それはデフォルトの伝統的な

The possible options are:可能なオプションは以下のとおりです。

  • traditional - Shows ignored files and directories, unless --untracked-files=all is specified, in which case individual files in ignored directories are displayed.traditional - --untracked-files = allが指定されていない限り、無視されたファイルとディレクトリを表示します。その場合、無視されたディレクトリ内の個々のファイルが表示されます。

  • no - Show no ignored files.no - 無視されたファイルを表示しません。

  • matching - Shows ignored files and directories matching an ignore pattern.matching - 無視パターンに一致する無視ファイルおよびディレクトリを表示します。

When matching mode is specified, paths that explicitly match an ignored pattern are shown. If a directory matches an ignore pattern, then it is shown, but not paths contained in the ignored directory. If a directory does not match an ignore pattern, but all contents are ignored, then the directory is not shown, but all contents are shown.場合一致モードが指定され、明示的に無視されたパターンと一致する経路が示されています。ディレクトリが無視パターンに一致すると表示されますが、無視されたディレクトリに含まれるパスは表示されません。ディレクトリが無視パターンと一致しないが、すべての内容が無視される場合、そのディレクトリは表示されず、すべての内容が表示されます。

-z

Terminate entries with NUL, instead of LF. This implies the --porcelain=v1 output format if no other format is given.LFではなくNULでエントリを終了します。--porcelain=v1他の形式が指定されていない場合、これは出力形式を意味します。

--column[=<options>] --column [= <オプション>]
--no-column

Display untracked files in columns. See configuration variable column.status for option syntax.--column and --no-column without options are equivalent to always and never respectively.追跡されていないファイルを列に表示します。オプションの構文については構成変数column.statusを参照してください。--columnそして--no-column、オプションなしでは、それぞれalwaysneverと同等です。

--ahead-behind - 後ろに
--no-ahead-behind - 先読みなし

Display or do not display detailed ahead/behind counts for the branch relative to its upstream branch. Defaults to true.上流のブランチに対するブランチの詳細な前後のカウントを表示または非表示にします。デフォルトはtrueです。

--renames
--no-renames

Turn on/off rename detection regardless of user configuration. See also git-diff[1] --no-renames.ユーザー設定に関係なく、名前変更検出をオン/オフにします。git-diff [1] もご覧ください--no-renames

--find-renames[=<n>] --find-renames [= <n>]

Turn on rename detection, optionally setting the similarity threshold. See also git-diff[1] --find-renames.名前の変更の検出をオンにし、オプションで類似度のしきい値を設定します。git-diff [1] もご覧ください--find-renames

<pathspec>…​ <pathspec>…

See the pathspec entry in gitglossary[7].gitglossary [7]pathspecエントリを参照してください。

OUTPUT出力

The output from this command is designed to be used as a commit template comment. The default, long format, is designed to be human readable, verbose and descriptive. Its contents and format are subject to change at any time.このコマンドからの出力は、コミットテンプレートのコメントとして使用されるように設計されています。デフォルトの長い形式は、人間が読める形式、冗長で記述的な形式に設計されています。その内容とフォーマットはいつでも変更される可能性があります。

The paths mentioned in the output, unlike many other Git commands, are made relative to the current directory if you are working in a subdirectory (this is on purpose, to help cutting and pasting). See the status.relativePaths config option below.サブディレクトリで作業している場合、出力に記載されているパスは、他の多くのGitコマンドとは異なり、現在のディレクトリを基準にして作成されます(切り取りと貼り付けを容易にするため)下記のstatus.relativePaths設定オプションを参照してください。

Short Formatショートフォーマット

In the short-format, the status of each path is shown as one of these forms短い形式では、各パスの状況はこれらの形式の1つとして表示されます。

XY PATH
XY ORIG_PATH -> PATH

where ORIG_PATH is where the renamed/copied contents came from. ORIG_PATH is only shown when the entry is renamed or copied. The XY is a two-letter status code.ここORIG_PATHで、リネーム/コピーされたコンテンツの出所はどこです。ORIG_PATHエントリの名前が変更またはコピーされたときにのみ表示されます。XY二文字のステータスコードです。

The fields (including the ->) are separated from each other by a single space. If a filename contains whitespace or other nonprintable characters, that field will be quoted in the manner of a C string literal: surrounded by ASCII double quote (34) characters, and with interior special characters backslash-escaped.フィールド(を含む->)は、単一のスペースで互いに区切られています。ファイル名に空白または他の印刷不可能な文字が含まれている場合、そのフィールドはCの文字列リテラルのように引用符で囲まれます。

For paths with merge conflicts, X and Y show the modification states of each side of the merge. For paths that do not have merge conflicts, X shows the status of the index, and Y shows the status of the work tree. For untracked paths, XY are ??. Other status codes can be interpreted as follows:マージの競合を持つパスの、XおよびYマージの各側の変形状態を示しています。マージの競合がないパスの場合X、インデックスYのステータスとワークツリーのステータスを表示します。追跡されていない経路の場合XYは、です??。他のステータスコードは次のように解釈されます。

  • ' ' = unmodified'' =未修正

  • M = modifiedM =修正済み

  • A = addedA =追加

  • D = deletedD =削除済み

  • R = renamedR =名前変更

  • C = copiedC =コピー済み

  • U = updated but unmergedU =更新されたがマージされていない

Ignored files are not listed, unless --ignored option is in effect, in which case XY are !!.ていない場合は無視されたファイルは、リストされていない--ignoredオプションが、その場合には、有効であるXYあります!!

X          Y     Meaning
-------------------------------------------------
	 [AMD]   not updated
M        [ MD]   updated in index
A        [ MD]   added to index
D                deleted from index
R        [ MD]   renamed in index
C        [ MD]   copied in index
[MARC]           index and work tree matches
[ MARC]     M    work tree changed since index
[ MARC]     D    deleted in work tree
[ D]        R    renamed in work tree
[ D]        C    copied in work tree
-------------------------------------------------
D           D    unmerged, both deleted
A           U    unmerged, added by us
U           D    unmerged, deleted by them
U           A    unmerged, added by them
D           U    unmerged, deleted by us
A           A    unmerged, both added
U           U    unmerged, both modified
-------------------------------------------------
?           ?    untracked
!           !    ignored
-------------------------------------------------

Submodules have more state and instead report M the submodule has a different HEAD than recorded in the index m the submodule has modified content ? the submodule has untracked files since modified content or untracked files in a submodule cannot be added via git add in the superproject to prepare a commit.サブモジュールはより多くの状態を持ち、代わりにサブモジュールがインデックスmに記録されているものとは異なるHEADを持っていると報告します。サブモジュール内の変更されたコンテンツまたは未追跡ファイルをgit addスーパープロジェクト内で追加してコミットを準備することはできないため、サブモジュールは未追跡ファイルを持っています。

m and ? are applied recursively. For example if a nested submodule in a submodule contains an untracked file, this is reported as ? as well.メートル再帰的に適用されます。たとえば、サブモジュール内のネストされたサブモジュールに追跡されていないファイルが含まれる場合、これはと報告されます。同様に。

If -b is used the short-format status is preceded by a line-bが使用されている場合は、短い形式の状況の前に行が続きます。

## branchname tracking info

Porcelain Format Version 1磁器フォーマットバージョン1

Version 1 porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between Git versions or based on user configuration. This makes it ideal for parsing by scripts. The description of the short format above also describes the porcelain format, with a few exceptions:バージョン1の磁器フォーマットはショートフォーマットに似ていますが、Gitバージョン間で後方互換性のない方法で変更されたり、ユーザ設定に基づいて変更されたりしないことが保証されています。これはスクリプトによる構文解析に理想的です。上記の短い形式の説明は、いくつかの例外を除いて磁器の形式についても説明しています。

  1. The user’s color.status configuration is not respected; color will always be off.ユーザーのcolor.status設定は尊重されません。色は常に消えます。

  2. The user’s status.relativePaths configuration is not respected; paths shown will always be relative to the repository root.ユーザーのstatus.relativePaths設定は尊重されません。表示されるパスは、常にリポジトリのルートからの相対パスになります。

There is also an alternate -z format recommended for machine parsing. In that format, the status field is the same, but some other things change. First, the -> is omitted from rename entries and the field order is reversed (e.g from -> to becomes to from). Second, a NUL (ASCII 0) follows each filename, replacing space as a field separator and the terminating newline (but a space still separates the status field from the first filename). Third, filenames containing special characters are not specially formatted; no quoting or backslash-escaping is performed.マシン解析に推奨される代替の-z形式もあります。そのフォーマットでは、statusフィールドは同じですが、他のいくつかの点が変わります。まず、- >が名前変更エントリから省略され、フィールドの順序が逆になります(例:from - > toto なります)。次に、各ファイル名の後にNUL(ASCII 0)が続き、フィールドの区切り文字としてのスペースと末尾の改行に置き換えられます(ただし、ステータスフィールドと最初のファイル名はスペースで区切られます)。第三に、特殊文字を含むファイル名は特別にフォーマットされていません。引用符やバックスラッシュのエスケープは行われません。

Any submodule changes are reported as modified M instead of m or single ?.すべてのサブモジュールの変更は、singleのM代わりにmodifiedとしてレポートされます。m?

Porcelain Format Version 2磁器フォーマットバージョン2

Version 2 format adds more detailed information about the state of the worktree and changed items. Version 2 also defines an extensible set of easy to parse optional headers.バージョン2フォーマットでは、ワークツリーの状態と変更された項目に関する詳細情報が追加されています。バージョン2では、オプションのヘッダーを解析しやすい拡張可能なセットも定義しています。

Header lines start with "#" and are added in response to specific command line arguments. Parsers should ignore headers they don’t recognize.ヘッダー行は "#"で始まり、特定のコマンド行引数に応じて追加されます。パーサは認識できないヘッダを無視するべきです。

Branch Headers分岐ヘッダ

If --branch is given, a series of header lines are printed with information about the current branch.場合--branch与えられ、ヘッダー行の一連の現在のブランチについての情報が印刷されています。

Line                                     Notes
------------------------------------------------------------
# branch.oid <commit> | (initial)        Current commit.
# branch.head <branch> | (detached)      Current branch.
# branch.upstream <upstream_branch>      If upstream is set.
# branch.ab +<ahead> -<behind>           If upstream is set and
					 the commit is present.
------------------------------------------------------------

Changed Tracked Entries追跡エントリの変更

Following the headers, a series of lines are printed for tracked entries. One of three different line formats may be used to describe an entry depending on the type of change. Tracked entries are printed in an undefined order; parsers should allow for a mixture of the 3 line types in any order.ヘッダーに続いて、追跡されたエントリーのために一連の行が印刷されます。変更のタイプに応じて、3つの異なる行フォーマットの1つを使用してエントリーを記述することができます。追跡されたエントリは未定義の順序で印刷されます。パーサーは、3つの行タイプを任意の順序で混在させることができます。

Ordinary changed entries have the following format:通常の変更エントリの形式は以下のとおりです。

1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>

Renamed or copied entries have the following format:名前変更またはコピーされたエントリは次の形式になります。

2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath>
Field       Meaning
--------------------------------------------------------
<XY>        A 2 character field containing the staged and
	    unstaged XY values described in the short format,
	    with unchanged indicated by a "." rather than
	    a space.
<sub>       A 4 character field describing the submodule state.
	    "N..." when the entry is not a submodule.
	    "S<c><m><u>" when the entry is a submodule.
	    <c> is "C" if the commit changed; otherwise ".".
	    <m> is "M" if it has tracked changes; otherwise ".".
	    <u> is "U" if there are untracked changes; otherwise ".".
<mH>        The octal file mode in HEAD.
<mI>        The octal file mode in the index.
<mW>        The octal file mode in the worktree.
<hH>        The object name in HEAD.
<hI>        The object name in the index.
<X><score>  The rename or copy score (denoting the percentage
	    of similarity between the source and target of the
	    move or copy). For example "R100" or "C75".
<path>      The pathname.  In a renamed/copied entry, this
	    is the target path.
<sep>       When the `-z` option is used, the 2 pathnames are separated
	    with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
	    byte separates them.
<origPath>  The pathname in the commit at HEAD or in the index.
	    This is only present in a renamed/copied entry, and
	    tells where the renamed/copied contents came from.
--------------------------------------------------------

Unmerged entries have the following format; the first character is a "u" to distinguish from ordinary changed entries.マージされていないエントリの形式は以下のとおりです。最初の文字は、通常の変更されたエントリと区別するための "u"です。

u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
Field       Meaning
--------------------------------------------------------
<XY>        A 2 character field describing the conflict type
	    as described in the short format.
<sub>       A 4 character field describing the submodule state
	    as described above.
<m1>        The octal file mode in stage 1.
<m2>        The octal file mode in stage 2.
<m3>        The octal file mode in stage 3.
<mW>        The octal file mode in the worktree.
<h1>        The object name in stage 1.
<h2>        The object name in stage 2.
<h3>        The object name in stage 3.
<path>      The pathname.
--------------------------------------------------------

Other Itemsその他の項目

Following the tracked entries (and if requested), a series of lines will be printed for untracked and then ignored items found in the worktree.追跡されたエントリに続いて(そして要求された場合)、一連の行が追跡されずにワークツリーで見つかった項目を無視して印刷されます。

Untracked items have the following format:追跡されていないアイテムの形式は次のとおりです。

? <path>

Ignored items have the following format:無視された項目は以下の形式を取ります。

! <path>

Pathname Format Notes and -zパス名の形式に関する注意事項と-z

When the -z option is given, pathnames are printed as is and without any quoting and lines are terminated with a NUL (ASCII 0x00) byte.場合-zオプションが指定され、任意の引用なしでラインがNUL(ASCIIの0×00)バイトで終端されているように、パス名が印刷されています。

Without the -z option, pathnames with "unusual" characters are quoted as explained for the configuration variable core.quotePath (see git-config[1]).この-zオプションがなければ、"変わった"文字を含むパス名は設定変数で説明されているように引用符で囲まれますcore.quotePathgit-config [1]を参照)。

CONFIGURATION設定

The command honors color.status (or status.color — they mean the same thing and the latter is kept for backward compatibility) and color.status.<slot> configuration variables to colorize its output.コマンド?はその出力を色付けするためのcolor.status(またはstatus.color- 同じ意味を意味し、後者は下位互換性のために保持されています)およびcolor.status.<slot>構成変数を尊重します。

If the config variable status.relativePaths is set to false, then all paths shown are relative to the repository root, not to the current directory.config変数status.relativePathsがfalseに設定されている場合、表示されるすべてのパスは現在のディレクトリではなくリポジトリのルートからの相対パスです。

If status.submoduleSummary is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be shown (see --summary-limit option of git-submodule[1]). Please note that the summary output from the status command will be suppressed for all submodules when diff.ignoreSubmodules is set to all or only for those submodules where submodule.<name>.ignore=all. To also view the summary for ignored submodules you can either use the --ignore-submodules=dirty command line option or the git submodule summary command, which shows a similar output but does not honor these settings.status.submoduleSummaryが0以外の数値またはtrue(-1または無制限の数値と同じ)に設定されている場合、サブモジュールの要約は長い形式で使用可能になり、変更されたサブモジュールのコミットの要約が表示されます(--summary-limitオプションを参照)ののgit -サブモジュール[1] )。statusコマンドからの要約出力は、allにdiff.ignoreSubmodules設定されている場合、またはwhere が設定されているサブモジュールについてのみ設定されている場合、すべてのサブモジュールについて抑制されますsubmodule.<name>.ignore=all。無視されたサブモジュールの要約も表示するには、 - ignore-submodules = dirtyコマンドラインオプションまたはgit submodule summaryコマンドを使用します。これは、同様の出力を表示しますが、これらの設定を受け入れません。

BACKGROUND REFRESH背景リフレッシュ

By default, git status will automatically refresh the index, updating the cached stat information from the working tree and writing out the result. Writing out the updated index is an optimization that isn’t strictly necessary (status computes the values for itself, but writing them out is just to save subsequent programs from repeating our computation). When status is run in the background, the lock held during the write may conflict with other simultaneous processes, causing them to fail. Scripts running status in the background should consider using git --no-optional-locks status (see git[1] for details).デフォルトでgit statusは、自動的にインデックスを更新し、作業ツリーからキャッシュされた統計情報を更新して結果を書き出します。更新されたインデックスをstatus書き出すことは厳密には必要ではない最適化です(それ自身のために値を計算しますが、それらを書き出すことは私たちの計算を繰り返すことから後続のプログラムを保存することだけです)。ときにstatusバックグラウンドで実行され、書き込み時に開催されたロックは、彼らが失敗し、他の同時プロセスと競合する可能性があります。statusバックグラウンドで実行されているスクリプトは使用を検討する必要がありますgit --no-optional-locks status(詳細についてはgit [1]を参照)。

SEE ALSO関連項目

gitignore[5]ジチニョーレ[5]

GIT

Part of the git[1] suite一部のgit [1]スイート

関連記事

スポンサーリンク

フンボルトペンギン

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

上に戻る