Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Move a Git Repo from Beanstalk to Github?

Tags:

git

github

I have my code repo in Beanstalk. How do I move the code from Beanstalk to Github?

like image 310
Thillai Narayanan Avatar asked Dec 16 '11 18:12

Thillai Narayanan


People also ask

How do I move a repository to GitHub?

Transferring a repository owned by your personal accountOn your GitHub Enterprise Server instance, navigate to the main page of the repository. Under your repository name, click Settings. Click Transfer. Read the warnings and enter the repository name to confirm that you've done so.


2 Answers

The recommended way to do this is to:

git clone --bare url/for/beanstalk/repo.git .
git push --mirror [email protected]:user/repo.git

Also see here: https://help.github.com/articles/importing-an-external-git-repo

like image 67
manojlds Avatar answered Sep 28 '22 08:09

manojlds


From the GitHub Documentation

# In this example, we use an external account named extuser and
# a GitHub account named ghuser to transfer repo.git

# Make a bare clone of the external repo to a local directory
$ git clone --bare https://githost.org/extuser/repo.git

# Push mirror to new GitHub repo
$ cd repo.git
$ git push --mirror https://github.com/ghuser/repo.git

# Remove temporary local repo
$ cd ..
$ rm -rf repo.git
like image 40
Joshua Pinter Avatar answered Sep 28 '22 08:09

Joshua Pinter