Tuesday, 6 October 2015

Existing project into new Bitbucket repo

  1. Create repository on your Bitbucket account
  2. Start Terminal and go into the folder, where you can have your project from Bitbucket (Git)
  3. You can try the command which the Bitbucket provides to you under 'I have an existing project' but I had a problem with it (No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master') 
  4. Create new folder and type git init in it (in Terminal)
  5. Type git remote add origin <your https address to the repository> in Terminal
  6. Copy your existing project into the directory where you create a Git
  7. Type following commands:
    • git add <folder with your project>/*
    • git commit -m 'a comment for the commit'
    • git push -u origin master
That's it! :-)