当我尝试将仅创建的新文件推送到不同的裸仓库时遇到问题。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,它应该在推送 –