zoukankan      html  css  js  c++  java
  • 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

    注:

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

  • 相关阅读:
    Leetcode424. 替换后的最长重复字符
    Leetcode82. 删除排序链表中的重复元素 II
    python 无序模块,hashlib模块
    python 内置方法
    python 面向对象的三大特性
    python 面向对象
    python 递归函数和二分查找
    python 装饰器
    python 函数名,闭包
    python 函数进阶
  • 原文地址:https://www.cnblogs.com/luosongchao/p/3408363.html
Copyright © 2011-2022 走看看