2

I just finished successfully (I hope) the process of migrating my CVS repository to GIT.

Now I have a folder within there are files but I'm annoyed and a little bit stuck with it !

What I want to know now is what should I do to import the resulted repo (a lot of projects) to my bitbucket account and start using it instead of CVS ?

Thanks

Abderrazak BOUADMA
  • 1,526
  • 2
  • 16
  • 38

1 Answers1

3

Your folder has been transformed into a fully functional Git Repository. With a few commands you can publish your work on github.

First create a project on Bitbucket.org, you should get a link like this one: git@bitbucket.org:username/project.git

Now from a command line with the git executables, use the following commands:

git remote add origin git@bitbucket.org:username/project.git

Which adds the location to the remote repository.

Then publish your work to bitbucket using the following command:

git push -u origin --all

This will push all branches to the bitbucket server.

Next time you want to update a branch, just use git push and the changes will be pushed

Update: If the imported repository contains multiple projects, you might want to split off the projects into it's own repositories. To accomplish this the subtree command can be used. More information here: Detach (move) subdirectory into separate Git repository

For each of these repositories to earlier commands can be used to add them to bitbucket.org

Community
  • 1
  • 1
Dekker1
  • 5,565
  • 25
  • 33
  • This would also work with an HTTPS link, just replace the link with one like this: https://username@bitbucket.org/username/project.git – Dekker1 May 23 '14 at 12:35
  • thank's but what happened is there were one git repository created for all "CVS projects" which means that I'll not be able to pull per project from the new git repository. any clue ? – Abderrazak BOUADMA May 25 '14 at 21:31
  • @Abderrazakk I've added a guide to split off project from the main repository. – Dekker1 May 26 '14 at 07:55
  • thanks @dekker but you've to know that there are a multiple cases where some "manual" handling are necessary. – Abderrazak BOUADMA May 28 '14 at 16:02