"forking" github to gitea, keeping upstream changes

I wanted to for thelounge for ##techsupport but retain the ability to pull their new changes. I wanted to host this on my gitea so I had to use a few threads to do it.

  1. Create a new repo, leave it blank with no licencse and a deleted readme
  2. Clone the repo down locally
  3. git remote add upstream https://github.com/user/repo "Upstream" is just a string, it is called this out of convienence
  4. git pull upstream master --allow-unrelated-histories
  5. git push origin

To pull and push down the road use:

  • git pull upstream master to pull new updates from your third party source (assuming master branch)
  • git push origin to push to your own repos (origin can be omitted)