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]

相关推荐
习惯就好zz7 小时前
Git 交互式 rebase 实战:将后续修改合并到历史提交
git
南棱笑笑生14 小时前
20260429给万象奥科的开发板HD-RK3576-PI适配瑞芯微原厂的Android14时删除全部的.git目录
git·rockchip
tsyjjOvO15 小时前
【Git 从入门到实战】(IDEA+Gitee 版)
git·gitee·idea
你知道“铁甲小宝”吗丶16 小时前
git推送到多平台(gitee/github)
git·gitee·github
bksczm16 小时前
Linux之基础开发工具之git
git
GUET_一路向前16 小时前
【git工作常用指令】
大数据·git·elasticsearch
handler0117 小时前
Git 核心指令速查
linux·c语言·c++·笔记·git·学习
二宝哥17 小时前
大数据之yum安装git
git
牛奶咖啡1318 小时前
Git实践——git远程仓库操作
git·git远程仓库的创建·github创建仓库·git将本地仓库推送到远程仓库·使用git克隆远程仓库到本地·git分支的创建与合并·git冲突的产生与解决
随风,奔跑19 小时前
Git学习笔记
笔记·git·学习