Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在本地有一个项目,我推送到 github。每次我尝试将提交推送到 github 时,它都会要求我提供远程 url。我不能配置它,让它自动推送到我想要的分支。
我尝试在存储库视图中设置远程跟踪,但它开始克隆我不需要的存储库,因为我已经在本地同步了我的分支。
最简单的方法是在新目录中尝试以下过程,以查看问题是否仍然存在:
git remote -v
git push -u origin yourBranch
origin/yourBranch
该分支的下一次推送可以使用简单的git push. 您不必再次指定远程 url。
git push