• github单独下载某一个文件夹


    可以借助svn工具进行下载,实现只下载repo下的指定文件夹内容

    背景

    需要下载这个文件夹下所有内容https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/java-idea

    解决

    master分支(这里就是)

    "/tree/master" 修改为"/trunk"(这个操作答主提到玩过google code应该熟悉)即
    https://github.com/rabbitmq/rabbitmq-tutorials/trunk/java-idea
    输入

    svn checkout https://github.com/rabbitmq/rabbitmq-tutorials/trunk/java-idea
    

    如果不是master

    将/trunk/换成/braches/branchname/就可以

    备注

    如果之前没用过svn,可参考下面两种安装
    1.windows需要安装TortoiseSVN
    2.因为比较喜欢linux那种安装方式,另外也安装了wsl,直接在指定文件夹shift+右键打开linux shell,输入

    syz@lonelyisland-desktop:/mnt/c/Users/10758/Desktop$ sudo apt install subversion
    [sudo] password for syz:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following package was automatically installed and is no longer required:
      libfreetype6
    Use 'sudo apt autoremove' to remove it.
    The following additional packages will be installed:
      libapr1 libaprutil1 libserf-1-1 libsvn1
    Suggested packages:
      db5.3-util libapache2-mod-svn subversion-tools
    The following NEW packages will be installed:
      libapr1 libaprutil1 libserf-1-1 libsvn1 subversion
    0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded.
    Need to get 2237 kB of archives.
    After this operation, 9910 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
    Get:2 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libaprutil1 amd64 1.6.1-2 [84.4 kB]
    Get:3 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libserf-1-1 amd64 1.3.9-6 [44.4 kB]
    Get:4 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libsvn1 amd64 1.9.7-4ubuntu1 [1183 kB]
    Get:5 http://mirrors.aliyun.com/ubuntu bionic/universe amd64 subversion amd64 1.9.7-4ubuntu1 [834 kB]
    Fetched 2237 kB in 1s (3876 kB/s)
    Selecting previously unselected package libapr1:amd64.
    (Reading database ... 28674 files and directories currently installed.)
    Preparing to unpack .../libapr1_1.6.3-2_amd64.deb ...
    Unpacking libapr1:amd64 (1.6.3-2) ...
    Selecting previously unselected package libaprutil1:amd64.
    Preparing to unpack .../libaprutil1_1.6.1-2_amd64.deb ...
    Unpacking libaprutil1:amd64 (1.6.1-2) ...
    Selecting previously unselected package libserf-1-1:amd64.
    Preparing to unpack .../libserf-1-1_1.3.9-6_amd64.deb ...
    Unpacking libserf-1-1:amd64 (1.3.9-6) ...
    Selecting previously unselected package libsvn1:amd64.
    Preparing to unpack .../libsvn1_1.9.7-4ubuntu1_amd64.deb ...
    Unpacking libsvn1:amd64 (1.9.7-4ubuntu1) ...
    Selecting previously unselected package subversion.
    Preparing to unpack .../subversion_1.9.7-4ubuntu1_amd64.deb ...
    Unpacking subversion (1.9.7-4ubuntu1) ...
    Setting up libapr1:amd64 (1.6.3-2) ...
    Setting up libaprutil1:amd64 (1.6.1-2) ...
    Setting up libserf-1-1:amd64 (1.3.9-6) ...
    Setting up libsvn1:amd64 (1.9.7-4ubuntu1) ...
    Setting up subversion (1.9.7-4ubuntu1) ...
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
    syz@lonelyisland-desktop:/mnt/c/Users/10758/Desktop$ svn checkout https://github.com/rabbitmq/rabbitmq-tutorials/trun
    k/java-idea
    A    java-idea/.idea
    A    java-idea/.idea/.name
    A    java-idea/.idea/libraries
    A    java-idea/.idea/libraries/lib.xml
    A    java-idea/.idea/misc.xml
    A    java-idea/.idea/modules.xml
    A    java-idea/.idea/vcs.xml
    A    java-idea/.idea/workspace.xml
    A    java-idea/lib
    A    java-idea/lib/amqp-client-5.7.1.jar
    A    java-idea/lib/slf4j-api-1.7.26.jar
    A    java-idea/lib/slf4j-simple-1.7.26.jar
    A    java-idea/src
    A    java-idea/src/EmitLog.java
    A    java-idea/src/EmitLogDirect.java
    A    java-idea/src/EmitLogHeader.java
    A    java-idea/src/EmitLogTopic.java
    A    java-idea/src/NewTask.java
    A    java-idea/src/PublisherConfirms.java
    A    java-idea/src/RPCClient.java
    A    java-idea/src/RPCServer.java
    A    java-idea/src/ReceiveLogHeader.java
    A    java-idea/src/ReceiveLogs.java
    A    java-idea/src/ReceiveLogsDirect.java
    A    java-idea/src/ReceiveLogsTopic.java
    A    java-idea/src/Recv.java
    A    java-idea/src/Send.java
    A    java-idea/src/Worker.java
    Checked out revision 1060.
    syz@lonelyisland-desktop:/mnt/c/Users/10758/Desktop$
    

    至此,该文件夹已经下载到此目录下了

    参考

    https://www.zhihu.com/question/25369412/answer/30579415

    日积月累,水滴石穿
  • 相关阅读:
    归类常用控件GroupBox、TabControl、Expander
    ScrollViewer控件
    捕获鼠标位置
    5、标记拓展
    如何实现文件增量同步——算法
    常用的 Nand Flash 指令如下:
    Consistent Hashing算法
    循环冗余检验 (CRC) 算法原理
    yaffs2根文件系统的构建过程
    linux内存管理之uboot第一步
  • 原文地址:https://www.cnblogs.com/lonelyisland/p/12771262.html
Copyright © 2020-2023  润新知