4

I am not very familiar with git, and my question might just be stupid. I would like to mirror a repository from github on my gitea server, and then add an additional branch to this repo. The goal is to have:

github
    |_ repo1
        |_ b1
        |_ b2

gitea
    |_ repo1 (mirror)
        |_ b1
        |_ b2
        |_ b3 created from commit X in b2

If I am correct, a fork is a copy of a repo at a given instant. The fork is not updated with the following commits applied to the original repo.

In gitea, I can mirror a repo. It will automatically pull new commits applied to the original repo. However, it doesn't let me push an additional branch to the mirror repo.

I would like the branch b1 and b2 to keep being updated while I work on the branch b3. Sometimes, I would merge either b1 or b2 into b3 to add the new updates which were applied.

How can I achieve this?

Creation of the mirror repo:

  1. New migration

step 1

  1. Check the mirror box

step 2

  1. Done. The repo is now a mirror. It will update automatically.
Mathieu
  • 5,410
  • 6
  • 28
  • 55
  • You can push `b3` to the origin of `gitea` (your own remote, not theirs), and then create a pull-request in github to ask the owners of the github repo to merge your branch in. – evolutionxbox Mar 03 '21 at 11:07
  • @evolutionxbox So I don't want to do anything on the github part. I just want to pull from github everything non stop (mirror) and then on my side, I would like to add b3. When I tried, gitea did not let me push a new branch to a mirror repository. I could pull the mirror repository from gitea (b1/b2) but I could not push b3. – Mathieu Mar 03 '21 at 11:20
  • May you explain the steps used to create this mirror? – evolutionxbox Mar 03 '21 at 11:21
  • @evolutionxbox Added with screenshots. – Mathieu Mar 03 '21 at 11:36
  • I've not seen this before, so I don't know. I had assumed you were talking about repos made using the command line. – evolutionxbox Mar 03 '21 at 11:40

0 Answers0