推送本地分支到远程
# sparrow @ MacBook-Pro-2 in ~/Documents/deveploment/project/* on git:wangyanan_1016_subquery x [11:33:22] C:1
# 新建分支
$ git branch test
# sparrow @ MacBook-Pro-2 in ~/Documents/deveploment/project/* on git:wangyanan_1016_subquery x [11:33:28]
# 检出分支
$ git checkout test
Switched to branch 'test'
# sparrow @ MacBook-Pro-2 in ~/Documents/deveploment/project/* on git:test x [11:33:40]
$ git push
fatal: The current branch test has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin test
# sparrow @ MacBook-Pro-2 in ~/Documents/deveploment/project/* on git:test x [11:33:42] C:128
$ git push --set-upstream origin test
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for test, visit:
remote:
To gitlab.*.com:xingren/*.git
* [new branch] test -> test
Branch 'test' set up to track remote branch 'test' from 'origin'.
删除远程分支
# sparrow @ MacBook-Pro-2 in ~/Documents/deveploment/project/* on git:test x [11:33:58]
$ git push origin --delete test
To gitlab.*.com:xingren/*.git
- [deleted] test
个人博客
网友评论