fatal: The current branch master has no upstream branch. To push the current branch and set
程序员文章站
2022-03-07 10:28:48
...
使用git push推送分支时,遇到错误:
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, usegit push --set-upstream origin master
大意就是,当前分支与远程分支未建立联系,按照提示运行将分支进行关联,然后再使用git push
命令
再次复习一下今天使用到的Git指令:
#查看分支
git branch
#切换到已有分支
git checkout 分支名
#切换到还未建立的分支
git checkout -b 新分支名
#显示当前项目状态
git status
#提交项目到本地仓库
git commit -m "备注信息"
#将本地仓库分支推送到远程仓库并建立分支
git push -u origin 分支名
#更新分支(合并分支)
git merge 分支名
推荐阅读
-
fatal: The current branch master has multiple upstream branches, refusing to puh. git push error!
-
git push 报错fatal the current branch master has no upstream branch和Everything up-to-date
-
fatal: The current branch dev has no upstream branch. To push the current branch and set the remote
-
fatal: The current branch xiao has no upstream branch. To push the current branch and set the remote
-
fatal: The current branch master has no upstream branch. To push the current branch and set
-
解决Git建立远程分支关联时fatal the current branch master has no upstream branch 问题
-
git提示fatal the current branch master has no upstream branch 问题
-
fatal: The current branch venueCamera has no upstream branch. To push the current branch and set the
-
fatal: The current branch developer has no upstream branch.
-
push出现问题:fatal: The current branch master has no upstream branch.