亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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-ls-files  - 顯示有關(guān)索引和工作樹中文件的信息

概要

git ls-files [-z] [-t] [-v]                (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*                (-[c|d|o|i|s|u|k|m])*                [--eol]                [-x <pattern>|--exclude=<pattern>]                [-X <file>|--exclude-from=<file>]                [--exclude-per-directory=<file>]                [--exclude-standard]                [--error-unmatch] [--with-tree=<tree-ish>]                [--full-name] [--recurse-submodules]                [--abbrev] [--] [<file>…]

描述

這將目錄緩存索引中的文件列表與實(shí)際工作目錄列表合并,并顯示兩者的不同組合。

下面的一個(gè)或多個(gè)選項(xiàng)可用于確定顯示的文件:

選項(xiàng)

-c   --cached

在輸出中顯示緩存的文件(默認(rèn))

-d   --deleted

在輸出中顯示已刪除的文件

-m   --modified

在輸出中顯示已修改的文件

-o   --others

在輸出中顯示其他(即未跟蹤的)文件

-i   --ignored

在輸出中只顯示被忽略的文件。在索引中顯示文件時(shí),只打印排除模式匹配的文件。顯示“其他”文件時(shí),只顯示通過排除模式匹配的文件。

-s   --stage

在輸出中顯示暫存內(nèi)容的模式位,對(duì)象名稱和階段編號(hào)。

--directory

如果整個(gè)目錄被分類為“其他”,則只顯示其名稱(帶有斜線)而不是其全部?jī)?nèi)容。

--no-empty-directory

不要列出空目錄。沒有 - 目錄無效。

-u   --unmerged

在輸出中顯示未合并的文件(forces --stage)

-k   --killed

在文件系統(tǒng)上顯示由于文件/目錄沖突而需要?jiǎng)h除的文件以使checkout-index成功。

-z

\ 0行輸出終止,不要引用文件名。有關(guān)更多信息,請(qǐng)參閱下面的OUTPUT。

-x <pattern>   --exclude=<pattern>

跳過未匹配的文件匹配模式。請(qǐng)注意,模式是一個(gè)外殼通配符模式。有關(guān)更多信息,請(qǐng)參閱下面的EXCLUDE PATTERNS。

-X <file>   --exclude-from=<file>

從<file>讀取排除模式; 每行1個(gè)。

--exclude-per-directory=<file>

讀取僅適用于<file>中的目錄及其子目錄的其他排除模式。

--exclude-standard

在每個(gè)目錄中添加標(biāo)準(zhǔn)Git排除項(xiàng):.git / info / exclude,.gitignore和用戶的全局排除文件。

--error-unmatch

如果任何<file>沒有出現(xiàn)在索引中,則將其視為錯(cuò)誤(返回1)。

--with-tree=<tree-ish>

當(dāng)使用--error-unmatch將用戶提供的<file>(即路徑模式)參數(shù)展開為路徑時(shí),假定自從指定的<tree-ish>后索引中刪除的路徑仍存在。使用此選項(xiàng)-s-u選項(xiàng)沒有任何意義。

-t

此功能已半棄用。對(duì)于編寫腳本的目的,git-status [1] --porcelain和git-diff-files [1] --name-status幾乎總是優(yōu)越的選擇,用戶應(yīng)該查看git-status [1] --short或git-diff [1] --name-status以獲得更多用戶友好的選擇。

此選項(xiàng)在每行開始時(shí)用以下標(biāo)記(后跟一個(gè)空格)標(biāo)識(shí)文件狀態(tài):

H

緩存

S

skip-worktree

M

未合并

R

removed/deleted

C

modified/changed

K

to be killed

?

other

-v

-t標(biāo)記為assume unchanged(請(qǐng)參閱git-update-index [1])的文件類似,但使用小寫字母。

--full-name

從子目錄運(yùn)行時(shí),該命令通常會(huì)輸出相對(duì)于當(dāng)前目錄的路徑。該選項(xiàng)強(qiáng)制相對(duì)于項(xiàng)目頂部目錄輸出路徑。

--recurse-submodules

在存儲(chǔ)庫中的每個(gè)子模塊上遞歸調(diào)用ls-files。目前只支持 - 高速緩存模式。

--abbrev=<n>

不顯示完整的40字節(jié)十六進(jìn)制對(duì)象行,只顯示部分前綴。非默認(rèn)位數(shù)可以用--abbrev = <n>來指定。

--debug

在描述文件的每一行之后,添加更多關(guān)于其緩存條目的數(shù)據(jù)。這旨在顯示盡可能多的手動(dòng)檢查信息; 確切的格式可能會(huì)隨時(shí)更改。

--eol

顯示文件的<eolinfo>和<eolattr>。<eolinfo>是當(dāng)“text”屬性為“auto”(或未設(shè)置且core.autocrlf不為false)時(shí)由Git使用的文件內(nèi)容標(biāo)識(shí)。<eolinfo>是“文本”,“無”,“l(fā)f”,“crlf”,“混合”或“”。

“”表示該文件不是常規(guī)文件,它不在索引中或在工作樹中無法訪問。

它是“”,“ -  text”,“text”,“text = auto”,“text eol = lf”,“text eol = crlf”時(shí)檢查或提交時(shí)使用的屬性。由于支持Git 2.10“text = auto eol = lf”和“text = auto eol = crlf”。

索引(“i / <eolinfo>”)和工作樹(“w / <eolinfo>”)中的<eolinfo>均顯示為常規(guī)文件,后面跟著(“attr / <eolattr>”)。

不要將更多的參數(shù)解釋為選項(xiàng)。

<file>

要顯示的文件。如果沒有給出文件,則顯示與其他指定標(biāo)準(zhǔn)相匹配的所有文件。

輸出

git ls-files只是輸出文件名,除非--stage在這種情況下輸出:

[<tag> ]<mode> <object> <stage> <file>

git ls-files --eol 將顯示i / <eolinfo> <SPACES> w / <eolinfo> <SPACES> attr / <eolattr> <SPACE *> <TAB> <file>

git ls-files --unmergedgit ls-files --stage可用于檢查對(duì)未合并的路徑的詳細(xì)信息。

對(duì)于未合并的路徑,索引不是記錄單個(gè)模式/ SHA-1對(duì),而是記錄多達(dá)三個(gè)這樣的對(duì); 一個(gè)來自階段1中的樹O,階段2中的A以及階段3中的B.這個(gè)信息可以由用戶(或瓷器)用來查看最終應(yīng)該在路徑上記錄什么。(有關(guān)狀態(tài)的更多信息,請(qǐng)參閱git-read-tree [1])

如果沒有這個(gè)-z選項(xiàng),帶有“不尋常”字符的路徑名將按照配置變量的說明引用core.quotePath(請(qǐng)參閱git-config [1])。使用-z文件名是逐字輸出的,并且該行由NUL字節(jié)終止。

排除模式

git ls-files可以在遍歷目錄樹時(shí)使用“排除模式”列表,并查找指定何時(shí)指定標(biāo)志 - 其他或--ignign的文件。gitignore [5]指定排除模式的格式。

這些排除模式來自這些地方,以便:

  1. 命令行標(biāo)志--exclude = <pattern>指定一個(gè)模式。模式按照它們?cè)诿钚兄谐霈F(xiàn)的順序排列。

  1. 命令行標(biāo)志--exclude-from = <file>指定一個(gè)包含模式列表的文件。模式按照它們?cè)谖募谐霈F(xiàn)的順序排列。

  1. 命令行標(biāo)志--exclude-per-directory = <name> git ls-files通常指定每個(gè)目錄中文件的名稱.gitignore。較深目錄中的文件優(yōu)先。模式按照它們?cè)谖募谐霈F(xiàn)的順序排列。

使用--exclude-from指定的文件中排除或讀取的模式在命令行上指定的模式相對(duì)于目錄樹的頂部。從--exclude-per-directory指定的文件中讀取的模式相對(duì)于模式文件出現(xiàn)的目錄。

Previous article: Next article: