zoukankan      html  css  js  c++  java
  • git克隆某个分支到本地指定的目录中

    通过git clone命令可以将远程git仓库拉取到本地。

    如果想要只是拉取某个分支,并且将拉下来的代码放到指定本地目录中,使用如下的命令:

    git clone --branch br01 http://172.20.58.152:8088/zhai01/test.git br01

    参数释义:

    --branch 指定分支的名字(br01)

    br01:命令最后的br01是本地的目录名字,如果不指定就和仓库名字一样的目录,这里是test

    执行过程:

    [root@nctest-snap-test-02 apps]# git clone --branch br01 http://172.20.58.152:8088/zhai01/test.git br01
    Cloning into 'br01'...
    Username for 'http://172.20.58.152:8088': zhai01
    Password for 'http://zhai01@172.20.58.152:8088': 
    remote: Enumerating objects: 23, done.
    remote: Counting objects: 100% (23/23), done.
    remote: Compressing objects: 100% (11/11), done.
    remote: Total 23 (delta 6), reused 23 (delta 6), pack-reused 0
    Unpacking objects: 100% (23/23), done.

    查看本地目录

    [root@test-snap-test-02 apps]# ls -l br01/
    total 24
    -rwxr-xr-x 1 root root 17 Jan  6 16:12 br01.sh
    -rwxr-xr-x 1 root root 17 Jan  6 16:12 br02.sh
    -rwxr-xr-x 1 root root  4 Jan  6 16:12 br03.sh
    -rwxr-xr-x 1 root root 12 Jan  6 16:12 br04.sh
    -rwxr-xr-x 1 root root 12 Jan  6 16:12 install.sh
    -rw-r--r-- 1 root root  8 Jan  6 16:12 README.md
    [root@test-snap-test-02 apps]# 

    已经将br01分支的内容放入到本地的br01目录中。

     
    ★★★★★如果您在查看博文时,有任何的疑问都可以加我的微信。13240133388. 希望可以帮助到您~★★★★
  • 相关阅读:
    VS2005中的WebApplication和WebSite
    CodeFile 与 CodeBehind 的区别
    vs2005默认浏览器(IE)灵异事件
    杭电OJ第4252题 A Famous City
    湘大OJ第1490题 Generating Random Numbers
    中南OJ 2012年8月月赛 B题 Barricade
    中南OJ 2012年8月月赛 H题 Happy watering
    杭电OJ第4245题 A Famous Music Composer
    中南OJ 2012年8月月赛 I题 Imagination
    杭电OJ第4256题 The Famous Clock
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/15771626.html
Copyright © 2011-2022 走看看