GIT 推送本地分支到远程,删除远程分支

2019-10-16  本文已影响0人  躺在家里干活

推送本地分支到远程

# 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

个人博客

上一篇下一篇

猜你喜欢

热点阅读