Migrate git from one server to another


Give new origin name here i have given as testtest and http://new-repo.com is new server repository url change as per yours .

-----------------------------------------------------------------------------------------------------------------------------------------
git clone --bare  http://current-repo.com
-----------------------------------------------------------------------------------------------------------------------------------------
$git remote add testtest http://new-repo.com
-----------------------------------------------------------------------------------------------------------------------------------------
$git push -f --tags testtest refs/heads/*:refs/heads/*
-----------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Start and Stop ssh-agent

Below is the bash script used to start and stop ss-agent #!/bin/bash ## in .bash_profile SSHAGENT=`which ssh-agent` SSHAGENTARGS="...