• git---从已有分支拉出新分支


    1:需要切换到被拉取的分支,并且拉取项目,命令如下:

    1
    2
    3
    $git checkout master 
     
    $git pull

    2:接着创建一个新分支,并且切换到新的分支:

    1
    2
    3
    $git branch newbranch
     
    $git checkout newbranch

    3:把本地分支push到远端:

    1
    $git push origin newbranch

    4:拉取远端分支

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    $git pull
     
    There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
     
    git pull <remote> <branch>
     
    If you wish to set tracking information for this branch you can do so with:
     
    git branch --set-upstream-to=origin/<branch> newbranch

     5:这说明,当前分支还没有和本地分支进行关联,下面进行关联

      git branch --set-upstream-to=origin/newbranch

     

     6:再次拉取,完成任务。

    1
    $git pull
  • 相关阅读:
    spring中的Filter使用
    跨站脚本(XSS)攻击
    RepeatSubmitInterceptor extends HandlerInterceptorAdapter
    理解TCP
    Github(第一次尝试)
    MVC(实战二:网址映射)
    MVC(实战一)
    MVC(基础二)
    WinFrom和WebFrom的区别
    MVC(基础一)
  • 原文地址:https://www.cnblogs.com/yerikm/p/11592153.html
Copyright © 2020-2023  润新知