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. 希望可以帮助到您~★★★★
  • 相关阅读:
    Beans
    HDU 1175 连连看
    HDU 1241 Oil Deposits dfs && bfs
    HDU1312:Red and Black
    背包问题
    canvas 和 svg
    前端性能优化---DOM操作
    四种常见的 POST 提交数据方式
    [转]浏览器缓存详解: expires, cache-control, last-modified, etag详细说明
    URL和URI
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/15771626.html
Copyright © 2011-2022 走看看