Steps to create a bitbucket repository and pushing files to it

Yesterday I created bitbucket account and tried push some of my python programs to it. But while committing I got some errors continuously.But  some how i managed to push my programs today with the help of my friends. So I would like to explain those steps again for those who are new to bitbucket repository and who got the similar problem. Here the steps are purely my own design. You can get the original instruction from bitbucket.orgitself.I suppose you have an account in and you have installed python and mercurial on your ubuntu/Linux. (if you have not installed mercurial just type ‘sudo apt-get install mercurial ‘ on your terminal.)

1)create a new repository in your bitbucket.

repository – > create a new repository

Select Repository

Create new repository

After repository created

2)You have created a repository in your account. Now You are going to clone bitbucket repository on your local drive.  Go to a directory (create a new diroctory for this special purpose) from terminal using ‘cd’ command and type following command.

hg clone

Note: give your repository address after hg clone.

Aftter this command you can see a directory named new_repository(the same name that you have given to your bibucket repository) in your directory. This is your bitbucket repository. You can add/copy/edit  files into this directory and follow rest of the steps.

3)type ‘hg add’ in your terminal.
Note : before doing step 3 you have to change your current postion to the newly created repository.
4)next you have to do ‘hg commit -u jinesh_paloor -Am “program to find factorial” ‘
Format: hg commit -u (user_name) -Am (“some pass phrase”)
When you type this command terminal will prompt for bitbucket username and password.
Inorder to complete the process and update the files to bitbucket repository type the following command in terminal
5) hg push

So now you have created a repository in your bitbucket account and pushed your files to it. You can add more files, edit existing repository , or delete files. Inorder to update repository just repeat the steps 3 ,4 and  5.


3 thoughts on “Steps to create a bitbucket repository and pushing files to it

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s