Guest User

Untitled

a guest
Jan 20th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # Assume we are in your home directory
  2. cd ~/
  3.  
  4. # Clone the repo from GitLab using the `--mirror` option
  5. $ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
  6.  
  7. # Change into newly created repo directory
  8. $ cd ~/my-repo.git
  9.  
  10. # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
  11. $ git push --no-verify --mirror git@github.com:mario/my-repo.git
  12.  
  13. # Set push URL to the mirror location
  14. $ git remote set-url --push origin git@github.com:mario/my-repo.git
  15.  
  16. # To periodically update the repo on GitHub with what you have in GitLab
  17. git fetch -p origin
  18. git push --no-verify --mirror
Add Comment
Please, Sign In to add comment