亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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-clean  - 從工作樹中刪除未跟蹤的文件

概要

git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>…

描述

通過從當前目錄開始遞歸地移除不受版本控制的文件來清除工作樹。

通常,只有Git未知的文件才會被刪除,但是如果-x指定了該選項,則也會刪除被忽略的文件。例如,這可以用于刪除所有構(gòu)建產(chǎn)品。

如果<path>...給出任何可選參數(shù),則只有那些路徑受到影響。

選項

-d

除了未跟蹤的文件之外,還要除去未跟蹤的目錄。如果未跟蹤的目錄由不同的Git存儲庫管理,則默認情況下不會刪除它。如果您真的想刪除這樣的目錄,請使用-f選項兩次。

-f   --force

如果Git配置變量clean.requireForce未設置為false,git clean將拒絕刪除文件或目錄,除非給定-f,-n或-i。除非給出第二個-f,否則Git將拒絕使用.git子目錄或文件刪除目錄。

-i   --interactive

以交互方式顯示將要完成的操作和清理文件。有關詳情,請參閱“交互模式”。

-n   --dry-run

不要實際刪除任何東西,只顯示會做什么。

-q   --quiet

Be quiet,只報告錯誤,而不是成功刪除的文件。

-e <pattern>   --exclude=<pattern>

除了在.gitignore(每個目錄)和$ GIT_DIR / info / exclude中發(fā)現(xiàn)的內(nèi)容外,還應將這些模式視為有效的忽略規(guī)則集。

-x

不要使用從.gitignore(每個目錄)和$ GIT_DIR / info / exclude讀取的標準忽略規(guī)則,但仍然使用與-e選項一起提供的忽略規(guī)則。這允許刪除所有未跟蹤的文件,包括構(gòu)建產(chǎn)品。這可以用來(可能與其結(jié)合git reset)創(chuàng)建一個原始工作目錄來測試一個干凈的構(gòu)建。

-X

只刪除Git忽略的文件。這對從頭開始重建所有內(nèi)容可能很有用,但保留手動創(chuàng)建的文件。

Interactive mode

當命令進入交互模式時,它顯示要清理的文件和目錄,并進入其交互式命令循環(huán)。

命令循環(huán)顯示可用的子命令列表,并提示“What now>”。通常,當提示以單個結(jié)尾時>,您可以只選擇其中一個選項并輸入return,如下所示:

    *** Commands ***        1: clean                2: filter by pattern    3: select by numbers        4: ask each             5: quit                 6: help
    What now> 1

只要選擇是獨一無二的,你也可以說cclean以上。

主要的命令循環(huán)有6個子命令。

clean

開始清理文件和目錄,然后退出。

按模式過濾

這顯示了要刪除的文件和目錄,并發(fā)出“輸入忽略模式>>”提示。您可以輸入空格分隔的模式以從刪除中排除文件和目錄。例如“* .c * .h”將刪除以“.c”和“.h”結(jié)尾的文件。當您對篩選結(jié)果滿意時,按ENTER(空)回到主菜單。

按數(shù)字選擇

這顯示要刪除的文件和目錄并發(fā)出“選擇要刪除的項目>>”提示。當提示以雙精度結(jié)束時>>,可以進行多個選擇,并將其與空格或逗號連接。你也可以說范圍。例如“2-5 7,9”從列表中選擇2,3,4,5,7,9。如果省略范圍中的第二個數(shù)字,則選擇所有剩余的項目。例如“7-”從列表中選擇7,8,9。你可以說*選擇一切。另外,當您對篩選結(jié)果滿意時,請按ENTER(空白)回到主菜單。

詢問每一個

這將開始清理,并且您必須逐個確認以刪除項目。請注意,此操作不如上述兩項操作有效。

quit

這可以讓你不做清潔就退出。

help

顯示交互式git-clean的簡要用法。

Previous article: Next article: