1

I am converting an SVN repository to a git repository using svn2git and Bit Bucket. Svn2git creates full git repositories on disk. I have hundreds of converted repos, so I am wondering if I can do this from the command line rather than from the Bit Bucket GUI.

I am using this snippet from the Bit Bucket REST API to create a new repository in Bit Bucket:

curl -u user:password -X POST -H "Content-Type: application/json" -d '{
    "name": "flow-engine",
   "scmId": "git",
    "forkable": true
}' http://localhost:7990/rest/api/1.0/projects/myproject/repos

This creates a new repository, but really what I want to do is import an existing converted repository.

eeijlar
  • 1,232
  • 3
  • 20
  • 53
  • 2
    It looks like you're all set. After creating the BitBucket repository, set it up as remote for your local git repository, and then [push all the branches to that remote](http://stackoverflow.com/questions/6865302/push-local-git-repo-to-new-remote-including-all-branches-and-tags). – larsks Mar 27 '17 at 13:08
  • Thanks that worked :) – eeijlar Mar 30 '17 at 15:34

0 Answers0