Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Last active February 8, 2024 09:37
Show Gist options
  • Save T1T4N/d472fdbca0dd1e78e09d91f0d767320b to your computer and use it in GitHub Desktop.
Save T1T4N/d472fdbca0dd1e78e09d91f0d767320b to your computer and use it in GitHub Desktop.
Mirroring a git repo
git clone --bare https://github.com/project/repo.git
cd repo
git push --mirror ssh://git@bitbucket/lib/new-repo.git
#f this results in the following error, go to step 4: 
#You are attempting to update refs that are reserved for Bitbucket's pull request functionality. Bitbucket manages these refs automatically, and they may not be updated by users.
#remote: Rejected refs:
#remote:     refs/pull-requests/1/from
git push ssh://git@bitbucket/lib/new-repo.git
git push --tags ssh://git@bitbucket/lib/new-repo.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment