當我嘗試將僅創建的新文件推送到不同的裸倉庫時遇到問題。Git如何將不同的工作副本推送到不同的裸倉庫
說,我有兩個純倉庫:repo1.git和repo2.git
我克隆repo1.git的副本,並創建一個名爲test_repo1.txt
新文件
我推test_repo1.txt原點
我現在創建一個名爲test_repo2.txt 另一個文件我想(repo1.git)推ONLY test_repo2.txt從我的repo1.git工作副本到repo2.git存儲庫。
所以,我在我的repo1.git工作副本下運行以下命令。
git add test_repo2.txt
git commit -m "add only test_repo2.txt file to repo2.git"
git push repo2.git master:master
一旦我做了上面的命令,
我去到repo2.git工作拷貝,並找出「test_repo2.txt」文件是存在的,但「test_repo1.txt」文件也存在,這不是我想要的。我只想要「test_repo2.txt」在那裏沒有「test_repo1.txt」。
爲什麼 「test_repo1.txt」 文件最終在repo2.git的裸庫?
您的幫助將大大appriciated。
感謝
Finau
嗨,謝謝,優秀!非常感謝您的時間。很多appriciated伴侶。乾杯! – Finau
@Finau,沒問題!玩git。 – shelhamer
如果您使用較新版本的git,它應該在推送 –