• git创建远程分支


    现在我在master分支上,工作目标是干净的,也没有需要commit的:

    $ git branch
    * master
      release
     
    $ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    nothing to commit, working directory clean

    新建远程分支

     

    新建一个本地分支:

    $ git checkout -b dbg_lichen_star


    查看一下现在的分支状态:

    $ git branch
    * dbg_lichen_star
      master
      release

    星号(*)表示当前所在分支。现在的状态是成功创建的新的分支并且已经切换到新分支上。

    把新建的本地分支push到远程服务器,远程分支与本地分支同名(当然可以随意起名):

    $ git push origin dbg_lichen_star:dbg_lichen_star


    使用git branch -a查看所有分支,会看到remotes/origin/dbg_lichen_star这个远程分支,说明新建远程分支成功。

    删除远程分支
    我比较喜欢的简单方式,推送一个空分支到远程分支,其实就相当于删除远程分支:

    $ git push origin :dbg_lichen_star


    也可以使用:

    $ git push origin --delete dbg_lichen_star


    这两种方式都可以删除指定的远程分支
    --------------------- 
    作者:-FIGHTING- 
    来源:CSDN 
    原文:https://blog.csdn.net/u012701023/article/details/79222731 
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    wireshake抓包,飞秋发送信息,python
    python问题:IndentationError:expected an indented block错误解决《转》
    560. Subarray Sum Equals K
    311. Sparse Matrix Multiplication
    170. Two Sum III
    686. Repeated String Match
    463. Island Perimeter
    146. LRU Cache
    694. Number of Distinct Islands
    200. Number of Islands
  • 原文地址:https://www.cnblogs.com/woailiming/p/12576968.html
Copyright © 2020-2023  润新知