• git创建和删除远程分支


    问题描述:

              使用git创建和删除远程分支

    问题解决:

                 (1)git创建本地分支

    git chuangjain

    注:   

            如上所示,使用命令 git branch -a 查看所有分支情况,以及当前分支

             使用命令git branch temporary 创建分支temporary

             使用命令 git checkout temporary 切换到temporary分支

         (2)git创建远程分支

    gittemporary

    注:

             如上所示,在本地分支 temporary中创建文件 并commit之后,创建远程分支 git   push  origin  temporary:temporary

          其中origin是远程仓库,第一个temporary是本地分支,第二个temporary是远程新建的分支(github中为例子)

    fenzhi

    注:

           如上图所示  temporary是刚才创建的远程分支

        (3)删除远程分支

               1)使用命令 git  push origin --delete 远程分支名   

    git delete

    注:

          使用命令  git    push   origin --delete hello (hello为远程分支名称)

    shanzhi

    注:

             github中删除远程分支hello之后效果图

           2)使用命令  git   push origin  :temporary

    shantemp

    注:

            使用命令  git   push origin  :远程分支名

    shan tempe

    注:

              删除远程分支之后的效果图

  • 相关阅读:
    20-存储过程
    21-事务
    18-触发器
    19-函数
    16-pymysql模块的使用
    17-视图
    CodeForces 1369B. AccurateLee
    CodeForces 1312D.Count the Arrays(组合数学)
    CodeForces 1362D. Johnny and Contribution
    CodeForces 1363F. Rotating Substrings
  • 原文地址:https://www.cnblogs.com/luosongchao/p/3408363.html
Copyright © 2020-2023  润新知