1

after looking around I've got a simple question unanswered:

Does the import tool from github also import the commit history from a project on Bitbucket of which I am the only contributor?

thanks for the help!

antoni
  • 5,001
  • 1
  • 35
  • 44

3 Answers3

1

simply check remote of your existing local .

1) git remote -v

2) create repo on github ... copy repository URL,

3) add your git remote repo into your local project,

git remote add origin https://github.io/my_proj.git

4) git push origin master it will mirror your current bitbucket project into git...

or if you want port try this,

in this scenario,

create bundle from your existing project,

git bundle create my_project.bundle --all

if you want you can clone from it. it is git repository for your project...

it will hold entire history of it...

and then create repo in github. copy repo URL and put it in project directory.

git remote add origin https://github.io/my_proj.git
Mohideen bin Mohammed
  • 18,813
  • 10
  • 112
  • 118
  • Thanks for your tutorial and your time! From this page https://github.com/new/import, I just pasted repo url and in 2 clicks it was done. – antoni Jul 31 '17 at 12:00
1

To import a private bitbucket repo to github, I used the SourceTree. In SourceTree ,

  1. Navigate to "Settings" gear dropdown icon on top right corner, then select "Accounts".Then select your bitbucket account as default from where you want to import the project.

  2. After closing the accounts window. Click the "New" drop down button and select "Clone from URL".Paste in the url of your bitbucket repo in "Source URL" input field. Specify the destination folder. Click "Clone". This will clone your bitbucket repo to local. Bitbucket repo url sample : https://myuserId@bitbucket.org/organistion/repo_name.git

  3. Create a new repo over github.com where you want to push this project.

  4. Copy the url of newly created empty repo over github.com

  5. Repeat Step 1 , but now select your github account as default one this time.

  6. In sourcetree, open the repo and navigate to settings icon on top right corner.

  7. A new window will open , select the Remotes tab. Under Remotes, edit the origin path , by replacing the remote bitbucket path with the above copied path of newly created repo over github.

  8. Then push your code. This will upload the latest code to newly created repo over github

Rakesh Verma
  • 766
  • 6
  • 14
0

From my experience, yes it does.

I've moved several projects from bitbucket to github and all the history was brought along with it, even when migrating from a Mercurial project.

Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825