gpt4 book ai didi

git - 克隆一个 github 存储库,进行更改,然后将除其中一项更改外的所有更改推回

转载 作者:太空狗 更新时间:2023-10-29 14:15:20 25 4
gpt4 key购买 nike

我想克隆一个 github 存储库并对其进行一些更改。我想提交 pull 请求以将这些更改 pull 到原始仓库。所有非常标准的东西。

但是,有一项更改我不想返回到原始存储库。我想修改我的克隆的 Maven Artifact ID,使其与原始 Artifact 不在同一个命名空间中,但显然我不想将该更改推送到原始 Artifact 。

设置克隆的最简单方法是什么,这样我就可以更改 Maven Artifact ID,而不必担心在推送其他更改时不小心将该更改推送到原始文件?

最佳答案

自动化的一种方法是使用脚本:

  • git checkout 上为您修改 maven id
  • git commit 上为你恢复原来的id

为此使用 gitattribute filter driver (您的脚本必须识别要修改的 pom.xml 的内容since they won't have the name or path of the files they can change)

enter image description here

关于git - 克隆一个 github 存储库,进行更改,然后将除其中一项更改外的所有更改推回,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13039398/

25 4 0