git使用筆記(十三)ls files

2022-08-30 12:54:11 字數 1680 閱讀 3604

by francis_hao    mar 18,2018

git ls-fles 顯示index和工作區的檔案的資訊。

git ls-files[-z][-t][-v]

(--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*

(-[c|d|o|i|s|u|k|m])*

[-x<pattern>|--exclude=<pattern>]

[-x<file>|--exclude-from=<file>]

[--exclude-per-directory=<file>]

[--exclude-standard]

[--error-unmatch][--with-tree=<tree-ish>]

[--full-name][--abbrev][--][<file>...]

顯示由工作目錄中新增到快取中的檔案的相關資訊。

下面的選項決定要顯示的檔案

選項含義

-c, --cached

顯示快取了的檔案(預設)

-d, --deleted

顯示刪除了的檔案

-m, --modified

顯示修改了的檔案

-o, --others

顯示其他型別的檔案(比如未追蹤的)

-i, --ignored

顯示忽略了的檔案(滿足忽略模式的)

-s, --stage

顯示暫存的條目的相關資訊(模式位,檔案雜湊後的值,暫存號和檔名),

比如:man git-ls-files

git 使用筆記

git 使用筆記 初始化資訊 git config user.name name git config user.email com git config core.editor vim git init 初始化資訊 從遠端pull git clone git url git pull push 到...

git使用筆記

回滾 git checkout sql 沒有 git add 之前 執行回滾到原始狀態 git reset head sql 執行git add之後,但是沒有 git commit之前 操作,然後在執行 git checkout git remote v 檢視遠端倉庫詳細資訊 git log log...

Git使用筆記

用了一段時間的tortoisgit,基本能滿足目前的需求。但是當切換到linux的工作環境時,就有點不知所措了,於是又複習了一下git的命令,相對於第一次學習,又有了新的認識。工作區 working tree 所有有改動的檔案都存在於工作區。暫存區 index 對於已經存在於工作區的檔案,執行git...