Skip to content

Instantly share code, notes, and snippets.

@gijun19
Created April 4, 2018 20:43
Show Gist options
  • Save gijun19/ec7765ffef9afdf71f99a34301ddc020 to your computer and use it in GitHub Desktop.
Save gijun19/ec7765ffef9afdf71f99a34301ddc020 to your computer and use it in GitHub Desktop.
Import Git Repository using CL
git clone --bare https://external-host.com/extuser/repo.git
# Makes a bare clone of the external repository in a local directory
cd repo.git
git push --mirror https://github.com/ghuser/repo.git
# Pushes the mirror to the new GitHub repository
// Remove temp repo
cd ..
rm -rf repo.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment