Skip to content

Instantly share code, notes, and snippets.

@jowagner
Last active October 10, 2019 10:50
Show Gist options
  • Save jowagner/79155cee29f82c2c741bcb16316e5da4 to your computer and use it in GitHub Desktop.
Save jowagner/79155cee29f82c2c741bcb16316e5da4 to your computer and use it in GitHub Desktop.
gogs to github backup

Setup:

  1. Create empty repo in github (click create and do not add any readme or licence)

  2. Run:

git pull
git remote add backup [email protected]:user/repo-name.git
git push -u backup master
git remote -v
git pull -v
git branch --set-upstream-to origin

Update backup and continue tracking origin:

git push -u backup master
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment