SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Tuesday, May 1, 2012

Migrating Git repository from Beanstalk to Github

For some reasons we were about to move our private repository from Beanstalk to Github.At first i cloned the private repo to my system
$ git clone git@ovcom.beanstalkapp.com:/mongo_git.git
Meanwhile i created a new repo named ui_mongo on Github.Also i renamed the mongo_git to ui_mongo on my local system
$ mv mongo_git ui_mongo
Then i changed the git configuration file which contains the url mapped with beanstalk repo to github repo
$ vim ~/Workz/ui_mongo/.git/config

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        #url = git@ovcom.beanstalkapp.com:/mongo_git.git
        url = git@github.com:ov/ui_mongo.git

Now i used when with a normal git push commands to push the files to master.
$ cd ~/workz/ui_mongo
$ git add remote origin git@github.com:ov/ui_mongo.git
$ git commit -m 'code migrated from bean to github'
$ git push master
Now i am able to find users commits with beanstalk repository on Github.Thus i have safely migrated my code from beanstalk to Github

No comments :

Post a Comment