跳到正文

Wiki

高階工具

約 1 分鐘閱讀

本文由簡體中文內容確定性轉換,並受版本化術語表保護。

1.vcs批次匯入倉庫

  1. 安裝

# debian系
sudo apt install python3-vcstool

# rhel系
sudo dnf install python3-vcstool

# pip3安装
pip3 install vcstool
  1. 檔案格式

副檔名為.repos或者.yaml,必須滿足yaml格式,否則會報錯。

如下,

repositories:是總標籤

ros_ws是克隆完這個倉庫,要把倉庫裡的檔案放在哪一個資料夾的資料夾的名字。

type是倉庫管理的型別,一般為git.

url是倉庫地址

version是分支名

repositories:
  ros_ws:
    type: git
    url: https://github.com/tungchiahui/ROS_WS.git
    version: main
  oepncv_projects:
    type: git
    url: https://github.com/tungchiahui/OpenCV_Projects.git
    version: main

以下是一個總示例:

repositories:
  tungchiahui:
    type: git
    url: https://github.com/tungchiahui/tungchiahui.git
    version: main
  ros_ws:
    type: git
    url: https://github.com/tungchiahui/ROS_WS.git
    version: main
  oepncv_projects:
    type: git
    url: https://github.com/tungchiahui/OpenCV_Projects.git
    version: main
  stm32_projetcts:
    type: git
    url: https://github.com/tungchiahui/STM32_Projects.git
    version: main
  mdk6_template:
    type: git
    url: https://github.com/tungchiahui/CubeMX_MDK5to6_Template.git
    version: master
  serial_pack:
    type: git
    url: https://github.com/tungchiahui/Serial_Pack.git
    version: main
  ros-docker:
    type: git
    url: https://github.com/tungchiahui/ros-docker.git
    version: main
  CyberRobotROS:
    type: git
    url: https://github.com/CyberNaviRobot/CyberRobot_ROS2_Jazzy_WS.git
    version: main
  CyberRobotMCU:
    type: git
    url: https://github.com/CyberNaviRobot/STM32_FreeRTOS_MainController.git
    version: main
  1. 如何使用?

把yaml檔案放在某個你要存放大量倉庫的資料夾下,敲入下方命令

vcs import < myrepos.yaml

如下圖,成功

2.Github代理

https://ghproxy.link/

3.搭建部落格

使用github搭建自己的部落格。

https://www.bilibili.com/video/BV1g68TzPEkh