1
我想將所有git筆記文檔(refs/notes/*
)從一箇中央git存儲庫轉移到另一箇中央git存儲庫。在2箇中央git服務器之間複製Git筆記
假設git中央服務器A
和B
,我想複製從A
到B
git筆記。
我試圖用類似的選項:
git push remoteB refs/notes/*:refs/notes/*; git push --mirror
(此選項的功能,但它刪除額外的裁判,例如分支,即不存在A
);git push --all
(此選項不會保持git筆記同步,但在保持refs/heads
同步的情況下運行良好)在提交後git掛鉤中。
[[email protected] modeln50.git]$ GIT_TRACE=1 git push
source +refs/notes/*:refs/notes/*
trace: built-in: git 'push' 'source' '+refs/notes/*:refs/notes/*'
trace: run_command: 'ssh' '-p' '8081' 'hdqpdsource1.modeln.com' 'git-receive-pack '\''/modeln56.git'\'''
它是正確拿起遙控器名稱,但該項目的名稱是錯誤的(modeln56
),此外,命令只是掛起沒有任何輸出。
與http://article.gmane.org/gmane.comp.version-control.git.user/4524一樣,你可以在GIT_TRACE環境變量設置爲1的情況下運行'git push'和看看什麼refspecs真的傳遞給'git send-pack'? (注意自我:gerrit評論說明:https://review.typo3.org/Documentation/refs-notes-review.html) – VonC 2013-03-26 07:34:26
嗨馮... thnaks爲您的評論...這裏是輸出:[git @ hdqpdqaapp5 modeln50.git] $ GIT_TRACE = 1 git push source + refs/notes/*:refs/notes/* trace:built-in:git'push''source''+ refs/notes/*:refs/notes/*' trace:run_command:'ssh''-p''8081''hdqpdsource1.modeln.com''git-receive-pack'\''/ modeln56.git'\'''它正在拾取遠程名稱正確,但是,項目名稱是錯誤的(modeln56),此外,該命令只是掛起沒有任何輸出... – user1920646 2013-03-26 14:53:32
好吧,什麼'git遠程-v'返回(當你的本地克隆執行時)? – VonC 2013-03-27 06:13:45