无法推送到 git 中的开发分支
我最近刚开始从事Azure并与Repos合作。当涉及到主分支时,我没有问题,但是当我尝试推动同事创建的Dev分支时,我会在推动时会遇到以下错误:
致命:'dev'似乎不是一个git存储库
致命:无法从存储库中读取
我使用了这些命令git push and git push dev
任何帮助都将不胜感激
I just recently started working on Azure and working with repos. I have no issues when it comes to pushing to master branch, but the moment I try to push to dev branch which a colleague created, I get the following error when pushing:
fatal: 'dev' does not appear to be a git repository
fatal: Could not read from repository
I used these commands git push and git push dev
Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用:
git状态
获得实际分支,该名称将在分支上的之后。复制此名称。
然后,您可以做:
git push oincom localbranchname:remoteBranch
ex:
如果
git状态
返回要推开开发分支,您需要执行:
git推动原点主:dev
You can get your actual branch with :
git status
, the name will be afterOn branch
. Copy this name.Then you can do :
git push origin localBranchName:RemoteBranch
ex:
If
git status
returnOn branch main
To push on dev branch you need to do:
git push origin main:dev