Kuzyo Yaroslav
Kuzyo Yaroslav

Reputation: 123

Copy rails projects from one machine to another(Github issue)

I’m new to rails and github and found such problem. I have cloned two projects to my first machine(work there sometime – made branches and all this stuff) and now I need to move these projects to my another machine – and I don’t know how to do it. I know that I can again clone this projects on my second machine but it didn’t save my branches. Can somebody give me any advices. Thanks for the help

P.s. Can I simply copy my projects folders from one machine on flashdrive and paste it to another machine?

Upvotes: 1

Views: 667

Answers (2)

rickb
rickb

Reputation: 34

You should also be able to accomplish this using the --bare and --mirror tags with git clone

git clone --mirror https://github.com/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository

cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
# Set the push location to your mirror

See this article form github for more info:

https://help.github.com/articles/duplicating-a-repository

And as @NitinJ said, from there you just run

rake db:create:all (or just enter the selected db's you want to create)
rake db:migrate

Upvotes: 0

Nitin Jain
Nitin Jain

Reputation: 3083

yes you can simply copy that on flashdrive and paste it to another machine

Upvotes: 2

Related Questions