Whenever I try using bitbucket for managing a project code, I always face the basic steps to create a repo whithin bitbucket :P. So, I decided to include here, these basic or initial steps as described originally by bitbucket.
I’m strating from scratch:
Set up your local directory
Set up Git on your machine if you haven’t already.
$ mkdir /path/to/your/project $ cd /path/to/your/project $ git init $ git remote add origin https://email@example.com/username/project.git
Create your first file, commit, and push
$ echo "XXXXX" >> contributors.txt $ git add contributors.txt $ git commit -m 'Initial commit with contributors' $git push -u origin master
I have an existing project:
Already have a Git repository on your computer? Let’s push it up to Bitbucket.
$ cd /path/to/my/repo
$ git remote add origin https://firstname.lastname@example.org/username/project.git
$ git push -u origin --all # pushes up the repo and its refs for the first time
$ git push -u origin --tags # pushes up any tags