gpt4 book ai didi

git - 将项目上传到现有项目

转载 作者:行者123 更新时间:2023-12-03 04:04:19 33 4
gpt4 key购买 nike

我在 azure ( https://dev.azure.com/ ) 中有一个项目,我在一台计算机上完成了它,然后我开始在另一台计算机上完成它,现在它与旧存储库没有连接,我现在如何将项目推送到旧存储库中仍然有旧文件?我的计算机上前后都有两个存储库

enter image description here

我在那里找不到这样的行

git remote add origin https://github.com/kepamuk/asdasdas.git
git push -u origin master

我应该如何将代码上传到旧存储库?

最佳答案

I can’t find such lines there

git remote add origin https://github.com/kepamuk/asdasdas.git

git push -u origin master

What should I do to upload my code to the old repository?

对于 azure devops 存储库,相应的 url 是 azure devops Web 门户中的存储库页面的 URL。

enter image description here

网址格式为:https://dev.azure.com/YourOrgName/YourProjectName/_git/YourReposName

所以相应的命令是(检查 this ):

git remote add origin https://dev.azure.com/YourOrgName/YourProjectName/_git/YourReposName

git add .

git commit -m "My test commit"

git push -u origin master

注意:如果您想克隆远程仓库,则 URL 与上面的不同。检查Clone the repo to your computer 。如果您刚才运行了git clone,则不需要运行git remote add origin

关于git - 将项目上传到现有项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60793272/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com