【GitHub】如果在进行PR时忘记 cloning forked repo,该如何进行修补呢

1 问题描述

在给【ros2/ros2_documentation】提交PR时,我们遇到一个问题:

最开始时我们忘记了需要**【clone forked repo】**,而使用官方地址将代码clone到了本地;

那么面对这种情况,该如何进行修补呢

2 解决方案

Claude告诉我们:

Claude-instant: 你现在本地代码仓库是直接clone的官方仓库,这与你想提交PR的fork仓库是不同的。

所以需要设置合适的上游分支:

bash 复制代码
git remote add origin https://github.com/YOUR_USERNAME/fork_repo.git 
相关推荐
哈基咪怎么可能是AI1 小时前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
九狼19 小时前
Flutter URL Scheme 跨平台跳转
人工智能·flutter·github
逛逛GitHub21 小时前
4 个热门的 GitHub 开源项目
github
程序员鱼皮1 天前
GitHub 关注突破 2w,我总结了 10 个涨星涨粉技巧!
前端·后端·github
HelloGitHub1 天前
《HelloGitHub》第 119 期
开源·github
冬奇Lab2 天前
一天一个开源项目(第35篇):GitHub Store - 跨平台的 GitHub Releases 应用商店
开源·github·资讯
Jahzo2 天前
openclaw桌面端体验--ClawX
人工智能·github
逛逛GitHub2 天前
6个粉丝推荐的 GitHub 项目,收藏一波。
github