dtpw54085 2015-09-09 09:18
浏览 39
已采纳

通过多个软件包为项目做出贡献

I'm trying to add a fake broker/backend for testing purpose to machinery, which is a task queue library in #golang.

All import paths are absolute in that project,

import "github.com/RichardKnop/machinery/v1/..."

However, to include my changes, I have to

  • manually modify those import paths to my fork
    • (replace "RichardKnop" with my username),
  • test my changes, and
  • revert those import paths to owner's fork before making a pull
    request.

Is there any suggestion on how to contribute others' forks without manually modifying import paths?

  • 写回答

1条回答 默认 最新

  • douchun5976 2015-09-09 10:11
    关注

    Just add another remote to the original git repository. Something like:

    cd $GOPATH/src/github.com/RichardKnop/machinery
    git remote add myfork git@github.com:missionliao/machinery.git
    git checkout -b master myfork/master
    

    Go is just looking for source code in folders so the folder and its actual git location don't have to match.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制