Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Roman Ignatov
Added: Feb 27, 2018 11:43 AM
Views: 14
Tags: git sysadmin
Found on https://gist.github.com/niksumeiko/8972566
In case if I want to move git repository as is (with history, branches etc) this steps will help.
  1. git clone --mirror OLD_REPO_URL
  2. cd OLD_REPO_CLONE_FOLDER
  3. git remote add NEW-REMOTE URL
  4. git push  NEW-REMOTE --mirror