git worktree (镜像站加速)

原因是一次想要将ros1的算法拉到ros2,所以想要在同一个目录里便捷diff。

于是这是执行过程

bash 复制代码
cd /home/ws/ws_core/src/FAST-LIVO2

# 1) 拉取走镜像
git remote set-url ros1 https://ghfast.top/https://github.com/yqmy0814/FAST-LIVO2.git

# 2) 推送回官方(避免误推到镜像)
git remote set-url --push ros1 https://github.com/yqmy0814/FAST-LIVO2.git

# 3) 确认
git remote -v
# 看到 fetch=ghfast..., push=github.com/... 就对了

# 4) 用浅/部分克隆加速拉取
git fetch --depth=1 --filter=blob:none --no-tags ros1 devel

一个扩展的git 代理选择是

bash 复制代码
git config --global url."https://ghfast.top/https://github.com/".insteadOf https://github.com/
# 需要还原时:
# git config --global --unset url."https://ghfast.top/https://github.com/".insteadOf

但我没用。

接着进行正常的编译,和正常的一模一样.

bash 复制代码
root@DW:/home/ws/ws_core# colcon list | grep -i livo
fast_livo    src/FAST-LIVO2    (ros.ament_cmake)
root@DW:/home/ws/ws_core# source /opt/ros/humble/setup.bash
root@DW:/home/ws/ws_core# colcon build
Starting >>> vikit_common
Finished <<< vikit_common [0.23s]                  
Starting >>> vikit_ros
Finished <<< vikit_ros [0.17s]                  
Starting >>> fast_livo
Finished <<< fast_livo [0.19s]                    

Summary: 3 packages finished [0.70s]

相关推荐
bukeyiwanshui3 小时前
20260518 Swift实验
git·swift
qziovv3 小时前
Git 回退场景
大数据·git·elasticsearch
来自大山深处的Doge_6 小时前
解决Git提交更新更改时出错: detected dubious ownership in repository at ...
git
嵌入式爱好者hsw8 小时前
Git 部署本地仓库
git
C137的本贾尼9 小时前
Git基本操作(三):版本回退,坐上“时光机”
git
ylifs10 小时前
目的驱动式Git用法
git
来尔君11 小时前
Git Bash 提示符简化(就是每次敲命令时上面显示的那一行信息)
git·命令行
我叫张小白。11 小时前
PyCharm 集成 Git 与 Gitee
git·pycharm·gitee
小雨青年12 小时前
Git Bisect 实战:用二分法快速找到引入 Bug 的提交
git·bug
一只大袋鼠12 小时前
Git (三):Tag 标签管理、图形工具、IDEA 集成与 GitLab 私有化部署
开发语言·git·gitlab