亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
characters

命名

git-status  - 顯示工作樹的狀態(tài)

概要

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

描述

顯示索引文件和當(dāng)前HEAD提交之間存在差異的路徑,工作樹和索引文件之間存在差異的路徑,以及工作樹中未由Git跟蹤的路徑(并且不會(huì)被gitignore [5]忽略) )。首先是你would通過跑步提交的內(nèi)容git commit; 第二和第三是could在運(yùn)行git add之前運(yùn)行的內(nèi)容git commit。

選項(xiàng)

-s   --short

以短格式輸出輸出。

-b   --branch

甚至以短格式顯示分支和跟蹤信息。

--show-stash

顯示當(dāng)前隱藏的條目數(shù)量。

--porcelain=<version>

為腳本提供易于解析格式的輸出。這與短輸出類似,但在Git版本中保持穩(wěn)定,并且不管用戶配置如何。詳情請(qǐng)參閱下文。

版本參數(shù)用于指定格式版本。這是可選的,默認(rèn)為原始版本v1格式。

--long

以長(zhǎng)格式輸出輸出。這是默認(rèn)設(shè)置。

-v   --verbose

除了已更改的文件名稱之外,還會(huì)顯示將要提交的文本更改(即與輸出一樣git diff --cached)。如果-v指定了兩次,那么還會(huì)顯示尚未上演的工作樹中的更改(即與輸出一樣git diff)。

-u<mode>   --untracked-files=<mode>

顯示未跟蹤的文件。

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).

可能的選項(xiàng)是:

  • no  - 不顯示未跟蹤的文件。

  • normal  - 顯示未跟蹤的文件和目錄。

  • all- 還顯示未跟蹤目錄中的單個(gè)文件。當(dāng)-u不使用選項(xiàng)時(shí),顯示未跟蹤的文件和目錄(即與指定相同normal),以幫助您避免忘記添加新創(chuàng)建的文件。由于需要額外的工作才能在文件系統(tǒng)中查找未跟蹤的文件,因此在大型工作樹中,此模式可能需要一些時(shí)間。考慮啟用未跟蹤緩存和分離指標(biāo)如果支持的話(見git update-index --untracked-cachegit update-index --split-index),否則,你可以使用nogit status返回更快,而不會(huì)顯示未跟蹤的文件??梢允褂胓it-config [1]中記錄的status.showUntrackedFiles配置變量來更改默認(rèn)值。--ignore-submodules = <when>查找更改時(shí)忽略對(duì)子模塊的更改。<when>可以是“none”,“untracked”,“dirty”或“all”,這是默認(rèn)設(shè)置。如果子模塊包含未跟蹤或已修改的文件,或者HEAD與超級(jí)項(xiàng)目中記錄的提交不同,并且可用于覆蓋ignore選項(xiàng)在git-config [1]或gitmodules [5]中。當(dāng)使用“未跟蹤”時(shí),如果子模塊僅包含未跟蹤內(nèi)容(但仍然針對(duì)修改內(nèi)容進(jìn)行掃描),則子模塊不會(huì)被視為臟。使用“dirty”忽略對(duì)子模塊工作樹的所有更改,只顯示存儲(chǔ)在超級(jí)項(xiàng)目中的提交更改(這是1.7.0之前的行為)。使用“all”隱藏對(duì)子模塊的所有更改(并在status.submoduleSummary設(shè)置了配置選項(xiàng)時(shí)禁止輸出子模塊摘要)。 - 也顯示忽略的文件。-z使用NUL而不是LF終止條目。--porcelain=v1如果沒有給出其他格式,這意味著輸出格式。--column = <選項(xiàng)> --no-column在列中顯示未跟蹤的文件。有關(guān)選項(xiàng)語(yǔ)法,請(qǐng)參閱配置變量column.status。--column--no-column沒有選項(xiàng)相當(dāng)于alwaysnever分別。<pathspec> ...請(qǐng)參閱pathspecgitglossary [7]中的條目。輸出此命令的輸出旨在用作提交模板注釋。默認(rèn)的長(zhǎng)格式設(shè)計(jì)為人類可讀,詳細(xì)和描述性的。它的內(nèi)容和格式隨時(shí)可能發(fā)生變化。輸出中提到的路徑與其他許多Git命令不同,它是相對(duì)于當(dāng)前目錄而言的,如果您在子目錄中工作(這是為了幫助剪切和粘貼)。請(qǐng)參閱下面的status.relativePaths配置選項(xiàng)。小格式在短格式中,每個(gè)路徑的狀態(tài)顯示為XY PATH1  - > PATH2其中PATH1是路徑HEAD,而“ -> PATH2”部分僅在顯示時(shí)顯示PATH1對(duì)應(yīng)于索引/工作樹中的不同路徑(即文件被重命名)。這XY是一個(gè)雙字母狀態(tài)碼。字段(包括->)由一個(gè)空格相互分隔。如果文件名包含空格或其他非打印字符,則該字段將以C字符串文字的方式引用:由ASCII雙引號(hào)(34)字符包圍,并且包含內(nèi)部特殊字符反斜線轉(zhuǎn)義。對(duì)于具有合并沖突的路徑,X以及Y顯示合并每一側(cè)的修改狀態(tài)。對(duì)于沒有合并沖突的路徑,X顯示索引Y的狀態(tài),并顯示工作樹的狀態(tài)。對(duì)于未跟蹤的路徑,XY??。其他狀態(tài)代碼可以解釋如下:

  • ''=未修改

  • M =修改

  • A =已添加

  • D =已刪除

  • R =重命名

  • C =復(fù)制

  • U =已更新但尚未裝入

被忽略的文件未列出,除非--ignored選項(xiàng)生效,在這種情況下XY!!。

X          Y     Meaning-------------------------------------------------          [MD]   not updated
M        [ MD]   updated in index
A        [ MD]   added to index
D         [ M]   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           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-------------------------------------------------

子模塊具有更多的狀態(tài),相反,報(bào)告M子模塊具有與索引m中記錄的HEAD不同的子模塊具有修改的內(nèi)容?子模塊具有未跟蹤文件,因?yàn)樽幽K中的修改內(nèi)容或未跟蹤文件無法通過git add超級(jí)項(xiàng)目添加以準(zhǔn)備提交。

m?遞歸應(yīng)用。例如,如果子模塊中的嵌套子模塊包含未跟蹤文件,則也會(huì)報(bào)告此情況?。

如果使用-b,則短格式狀態(tài)前面有一行

## branchname tracking info

Porcelain Format Version 1

版本1的瓷質(zhì)格式與短格式類似,但保證不會(huì)以Git版本之間不兼容的方式或基于用戶配置進(jìn)行更改。這使它成為腳本解析的理想選擇。上面短格式的描述也描述了瓷器格式,但有一些例外:

  • 用戶的color.status配置不受尊重; 顏色將始終關(guān)閉。

  • 用戶的status.relativePaths配置不受尊重; 顯示的路徑將始終與存儲(chǔ)庫(kù)根目錄相關(guān)。

還有一種推薦用于機(jī)器解析的備用-z格式。在這種格式下,狀態(tài)字段是相同的,但其他一些事情會(huì)改變。首先,->從重命名條目中忽略該字段,并且字段順序顛倒(例如from -> to變成to from)。其次,NUL(ASCII 0)跟在每個(gè)文件名后面,將空格替換為字段分隔符和終止換行符(但空格仍將狀態(tài)字段與第一個(gè)文件名隔開)。第三,包含特殊字符的文件名不是專門格式化的; 不執(zhí)行引用或反斜杠轉(zhuǎn)義。

任何子模塊更改都將報(bào)告為已修改M而不是m或單個(gè)報(bào)告?。

Porcelain Format Version 2

版本2格式添加了有關(guān)工作樹狀態(tài)和更改項(xiàng)目的更詳細(xì)信息。第2版還定義了一套易于解析可選標(biāo)題的可擴(kuò)展集合。

標(biāo)題行以“?!遍_頭,并在響應(yīng)特定命令行參數(shù)時(shí)添加。解析器應(yīng)該忽略它們不認(rèn)識(shí)的標(biāo)題。

Branch Headers

如果--branch給出,則會(huì)打印一系列標(biāo)題行,其中包含有關(guān)當(dāng)前分支的信息。

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

在標(biāo)題之后,會(huì)打印一系列行以跟蹤條目。取決于改變的類型,可以使用三種不同的線格式之一來描述條目。被跟蹤的條目以未定義的順序打印; 解析器應(yīng)該允許以任何順序混合3種線型。

普通更改的條目具有以下格式:

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 percentageof similarity between the source and target of the
move or copy). For example "R100" or "C75".  <path>      The pathname.  In a renamed/copied entry, thisis the path in the index and in the working tree.  <sep>       When the `-z` option is used, the 2 pathnames are separatedwith a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)byte separates them.  <origPath>  The pathname in the commit at HEAD.  This is only
present in a renamed/copied entry, and tells
where the renamed/copied contents came from.  --------------------------------------------------------

未合并的條目具有以下格式; 第一個(gè)字符是“u”以區(qū)別于普通的已更改的條目。

u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
  Field       Meaning  --------------------------------------------------------  <XY>        A 2 character field describing the conflict typeas described in the short format.  <sub>       A 4 character field describing the submodule stateas 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

在跟蹤的條目(如果請(qǐng)求)之后,會(huì)打印一系列行,以便在工作樹中找到未跟蹤的項(xiàng)目,然后忽略它們。

未跟蹤的項(xiàng)目具有以下格式:

? <path>

忽略的項(xiàng)目具有以下格式:

! <path>

Pathname Format Notes and -z

當(dāng)-z給出該選項(xiàng)時(shí),路徑名將按原樣打印并且不帶任何引用,并且行以NUL(ASCII 0x00)字節(jié)結(jié)尾。

如果沒有這個(gè)-z選項(xiàng),帶有“不尋?!弊址穆窂矫麑凑张渲米兞康恼f明引用core.quotePath(請(qǐng)參閱git-config [1])。

Configuration

該命令榮譽(yù)color.status(或status.color- 他們意味著相同的事情,后者保持向后兼容性)和color.status.<slot>配置變量來著色其輸出。

如果config變量status.relativePaths設(shè)置為false,則顯示的所有路徑都是相對(duì)于存儲(chǔ)庫(kù)根目錄而不是當(dāng)前目錄。

如果status.submoduleSummary設(shè)置為非零數(shù)字或true(與-1或無限制數(shù)字相同),則將為長(zhǎng)格式啟用子模塊摘要,并顯示修改子模塊的提交摘要(請(qǐng)參閱--summary-limit選項(xiàng)git-submodule [1])。請(qǐng)注意,狀態(tài)命令的摘要輸出將在所有子模塊diff.ignoreSubmodules被設(shè)置為all或僅限其中的子模塊時(shí)被抑制submodule.<name>.ignore=all。要查看忽略子模塊的摘要,可以使用--ignore-submodules = dirty命令行選項(xiàng)或git submodule summary命令,該命令顯示類似的輸出,但不遵守這些設(shè)置。

Previous article: Next article: