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

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

命名

git-bundle  - 通過歸檔移動對象和引用

概要

git bundle create <file> <git-rev-list-args>git bundle verify <file>git bundle list-heads <file> [<refname>…]git bundle unbundle <file> [<refname>…]

描述

有些工作流要求一臺機器上的一個或多個開發(fā)分支在另一臺機器上復制,但這兩臺機器不能直接連接,因此不能使用交互式Git協(xié)議(git,ssh,http)。該命令提供了一種用于支撐git fetchgit pull通過在始發(fā)機器包裝在歸檔對象和引用,然后導入到那些使用另一存儲庫來操作git fetchgit pull通過某種手段移動存檔(例如,通過sneakernet)之后。由于存儲庫之間不存在直接連接,因此用戶必須為目標存儲庫持有的數(shù)據(jù)包指定基礎:數(shù)據(jù)包假定基礎中的所有對象都已存在于目標存儲庫中。

選項

create <file>

用于創(chuàng)建名為file的包。這需要git-rev-list-args參數(shù)來定義包內容。

verify <file>

用于檢查捆綁文件是否有效,并將干凈地應用于當前存儲庫。這包括對捆綁格式本身的檢查以及檢查先決條件提交是否存在并且在當前存儲庫中完全鏈接。git bundle打印缺少提交列表(如果有),并以非零狀態(tài)退出。

list-heads <file>

列出軟件包中定義的引用。如果后面跟隨一個引用列表,則只會打印出與給定值相匹配的引用。

unbundle <file>

傳遞包中的對象以git index-pack存儲在存儲庫中,然后打印所有定義的引用的名稱。如果給出了參考文獻列表,則只列出與列表中相匹配的參考文獻。這個命令真的很管用,打算只能被調用git fetch

<git-rev-list-args>

一列的參數(shù),接受列表git rev-parsegit rev-list(和包含命名ref時,請參閱指定下面的參考文獻),它指定的特定對象和引用運輸。例如,master~10..master導致當前主引用與自第10個祖先提交后添加的所有對象一起打包。對可能打包的引用和對象的數(shù)量沒有明確的限制。

<refname>…

用于限制報告的參考文獻的列表。這主要是為了使用git fetch,它只希望接收那些被請求的引用,而不一定是包中的所有內容(在這種情況下,git bundle就像git fetch-pack)。

指定參考

git bundle將只打包顯示的引用git show-ref:這包括頭部,標簽和遠程頭部。諸如master~1不能打包的參考文獻,但完全適合于定義基礎??梢源虬鄠€參考,并且可以指定多個參考。包裝的物品是那些沒有包含在給定基地聯(lián)盟中的物品。每個基可以明確指定(例如^master~10),或隱式地(例如master~10..master--since=10.days.ago master)。

目的地所使用的基礎是非常重要的。在謹慎的方面犯錯是可以的,導致包文件包含已經在目標中的對象,因為在目的地解包時忽略這些對象。

例子

假設您希望將歷史記錄從計算機A上的存儲庫R1傳輸?shù)接嬎銠CB上的另一個存儲庫R2中。出于任何原因,A和B之間的直接連接不被允許,但我們可以通過某種機制將數(shù)據(jù)從A移動到B(CD ,電子郵件等)。我們想要在R1的分支主機上進行開發(fā)時更新R2。

為了引導流程,您可以先創(chuàng)建一個沒有任何基礎的軟件包。您可以使用標簽來記住您上次處理的內容,以便稍后使用增量包更新其他存儲庫:

machineA$ cd R1
machineA$ git bundle create file.bundle master
machineA$ git tag -f lastR2bundle master

然后將file.bundle傳輸?shù)侥繕擞嬎銠CB.由于此捆綁包不需要提取任何現(xiàn)有對象,因此可以通過從計算機克隆來在計算機B上創(chuàng)建新的存儲庫:

machineB$ git clone -b master /home/me/tmp/file.bundle R2

這將在生成的存儲庫中定義一個名為“origin”的遠程服務器,該服務器允許您從包中獲取和拉取數(shù)據(jù)。R2中的$ GIT_DIR / config文件將包含如下所示的條目:

[remote "origin"]
    url = /home/me/tmp/file.bundle
    fetch = refs/heads/*:refs/remotes/origin/*

要更新生成的mine.git存儲庫,可以使用增量更新替換存儲在/home/me/tmp/file.bundle中的包后進行讀取或拉取。

在原始存儲庫中完成更多工作后,可以創(chuàng)建增量包來更新其他存儲庫:

machineA$ cd R1
machineA$ git bundle create file.bundle lastR2bundle..master
machineA$ git tag -f lastR2bundle master

然后您將該軟件包轉移到另一臺機器以替換/home/me/tmp/file.bundle,并從中取出。

machineB$ cd R2
machineB$ git pull

如果您知道預期的收件人存儲庫應提供哪些必要的對象,則可以使用該知識來指定基準,并提供一個截止點來限制生成的捆綁包中的修訂和對象。前面的例子為此使用了lastR2bundle標簽,但您可以使用任何其他選項,您可以將它們提供給git-log [1]命令。這里有更多的例子:

您可以使用以下兩種標簽:

$ git bundle create mybundle v1.0.0..master

你可以使用基于時間的基礎:

$ git bundle create mybundle --since=10.days master

您可以使用提交的數(shù)量:

$ git bundle create mybundle -10 master

您可以運行git-bundle verify以查看是否可以從以基礎創(chuàng)建的包中提取:

$ git bundle verify mybundle

這將列出你必須提交什么提交,如果你沒有提交,就會出錯。

從收件人存儲庫的角度來看,捆綁包就像它從中提取或從中取出的常規(guī)存儲庫。例如,您可以在提取時映射引用:

$ git fetch mybundle master:localRef

你也可以看到它提供的參考資料:

$ git ls-remote mybundle
Article précédent: Article suivant: