annuaire recherche
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
personnages

Name

git-fetch-pack  - 从另一个存储库接收缺少的对象

概要

git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]        [--upload-pack=<git-upload-pack>]        [--depth=<n>] [--no-progress]        [-v] <repository> [<refs>…]

描述

通常你会想使用git fetch这个命令的更高级别的包装器来代替。

调用git-upload-pack可能是远程的存储库,并要求它发送从此存储库中丢失的对象,以更新指定的头。本地可用的提交列表是通过扫描本地引用/层次结构并发送到git-upload-pack另一端运行找出的。

当本地端没有共同的祖先提交时,该命令退化为下载所有内容以完成远程端的询问引用。

选项

--all

获取所有远程参考。

--stdin

从 stdin 中获取参考列表,每行一个。如果除了此选项外,还在命令行中指定了引用,则 stdin 中的引用将在命令行中的引用之后进行处理。

如果--stateless-rpc与此选项一起指定,则参考列表必须采用数据包格式(pkt-line)。每个 ref 必须位于一个单独的数据包中,并且该列表必须以flush数据包结尾。

-q   --quiet

通过-q标志git unpack-objects; 这使得克隆过程不那么冗长。

-k   --keep

不要调用git unpack-objects接收到的数据,而是从中创建一个包文件,并将其存储在对象数据库中。如果提供两次,则包装将被锁定以防重新包装。

--thin

获取一个“瘦”包,它基于未包含在包中的对象以分辨形式记录对象,以减少网络流量。

--include-tag

如果远程端支持它,如果标签引用的对象被下载,带标注的标签对象将被下载到与其他对象相同的连接上。来电者必须另外确定此选项可用的标签。

--upload-pack=<git-upload-pack>

git-upload-pack如果在 $ PATH 中没有找到,则使用它来指定远程端的路径。 sshd 的安装会忽略用户登录 shell 的环境设置脚本(例如 .bash_profile),而您的私有安装的 git 可能在系统缺省 $ PATH 中找不到。另一个解决方法是在“.bashrc”中设置你的 $ PATH,但是这个标志适用于那些不想为非交互式 shell 支付费用的人,因为它有一个精简的 .bashrc 文件(他们设置了大部分内容在 .bash_profile中)。

--exec=<git-upload-pack>

Same as --upload-pack=<git-upload-pack>.

--depth=<n>

限制获取祖先链不超过 n。即使git-upload-pack有一个悠长的祖先链,也将特殊深度2147483647视为无限。

--shallow-since=<date>

加深或缩短浅 'repository' 的历史记录,以在<date>之后包含所有可访问的提交。

--shallow-exclude=<revision>

加深或缩短浅储存库的历史记录以排除可从指定的远程分支或标记访问的提交。该选项可以多次指定。

--deepen-relative

参数--depth 指定来自当前浅边界的提交数量,而不是每个远程分支历史记录的提示数量。

--no-progress

不要显示进度。

--check-self-contained-and-connected

如果收到的包是自包含并连接的,则输出“连接正常”。

-v

运行详细。

<repository>

远程存储库的 URL。

<refs>…

远程负责人从中更新。这与 $ GIT_DIR 相关(例如“HEAD”,“refs / heads / master”)。未指定时,从远端所有人的头部更新。

如果遥控器启用了选项uploadpack.allowTipSHA1InWantuploadpack.allowReachableSHA1InWant或者uploadpack.allowAnySHA1InWant,它们也可以是遥控器上的 40-hex sha1。

Article précédent: Article suivant: