#318 [RFE] working with forked repositories
Opened 5 years ago by dhodovsk. Modified 2 years ago

When working with fedmsg, now when we have pagure, I wanted to find any info about how to work with repository forks - (fetching and pulling from my own repository fork). Is this documented somewhere?


Can you be more specific on "work with repository forks"? IIRC, there is no document dedicated for working with forks. But I tried to clone with namespace explicitly, e.g. fedpkg clone forks/cqi/rpms/fedpkg, which works.

My use case is:

  1. clone repository e.g. fedpkg clone colin
  2. get changes from specific pull-request (git remote add my_fork <something> && git fetch my_fork && git merge ...)
  3. test locally that after merge all tests pass

It would be great if it would be possible to get url of the fork somehow so I don't have to look it up.

I see. It would be case by case. My use case is

  • git clone ssh://cqi@pkgs.fedoraproject.org/forks/cqi/rpms/fedpkg.git
  • git remote add upstream https://src.fedoraproject.org/rpms/fedpkg.git
  • git fetch upstream

Each time PR is merged, I'll fetch changes from upstream and merge back to my fork.

It's free for anyone else to use their own workflow. rpkg is difficult to be bound to a fixed workflow I think.

But still, it would be great to have ability to write:

git remote add joes_fork forks/joe/rpms/fedpkg
instead of:
git remote add joes_fork ssh://dhodovsk@pkgs.fedoraproject.org/forks/joe/rpms/fedpkg.git

@cqi Does it mean, thenrpkg will not support forking branches? I guess, that pagure instance can be used also for forks and making CI magic over all PRs, like approve PRs if build of package is going well, all tests passed etc.

What do you think?

You might be interested that #560 introduced remote command, which could possibly be good good starting place for additional features, such as fork support

Login to comment on this ticket.

Metadata