How to move a Git repository from Beanstalk to Github?

I have a repo code in Beanstalk . How to move code from Beanstalk to Github ?

+8
source share
4 answers

Recommended way to do this:

git clone --bare url/for/beanstalk/repo.git . git push --mirror git@github.com :user/repo.git 

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

+13
source

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 
+3
source

If you already use Git on beanstalk, you can simply create an empty repository on GitHub and then add it as a remote in your local repo.

(if your repo is in ~ / project)

 cd ~/project git remote add github <github-ssh-url-here> git push github --all --tags 
+2
source

The other answers given here did not help me, but with the incredible help of Dan from Fork (even showing that I did not need his product at all!), I got the following steps that made transferring my 9 repositories from Beanstalk to githuhb, an absolute breeze. Hope they help someone else.

  1. Open terminal
  2. Create a temporary directory in your user directory: mkdir ~/moverepos
  3. Open this directory: cd moverepos
  4. Clone your old Beanstalk repository: git clone --bare <url/repositoryName.git>
  5. Open the repo directory: cd repositoryName.git
  6. Open Github, create a new EMPTY repository with the same name and copy its URL.
  7. Sending data to a new destination (in our case, GitHub): git push --mirror <newUrl/repositoryName.git>
  8. If this is your first time performing this process, you will be asked to enter your Beanstalk username and password. Enter them now and watch the repo pushing you to github.
  9. If you are done, you can delete your temporary directory in Finder and stop here.
  10. If you want to move more repositories, go to the root "moverepos": cd ..
  11. Go to 4.
0
source

All Articles