Wednesday, September 24, 2014

Push or Commit code to BitBucket Repository Using Git

This tutorial list all the steps to push the code from your local directory to BitBucket using git bash. Before committing you first clone BitBucket Repository on Local System

Steps to Push or Commit code First Time to BitBucket using Git Bash from Local System:

Step 1: After cloning git repository add a new file to it as shown in diagram below:

Git Repo push

Step 2: Now open Git Bash UI and then change to the directory which you have cloned on the system using cd command as shown below:

cd command in git bash

Step 3: Use git init command to initialize the directory as shown in the diagram below:

git init command

Step 4: Login to your bit bucket account . Open the repository and then expand the command line I have an existing project or I am starting from scratch and then copy the command as shown in the picture below:

command line in bit bucket

Step 5: Right click on git bash and then paste as shown in diagram below:

how to paste in git bash

Step 6: To add the file for commit use command git add * as shown in diagram below:

git add command

Step 7: To check which files are added to commit write command git status as shown below . It will show the file name for commit.

git status

Step 8: Now execute command git commit -m "your comment" as shown below:

git commit

Step 9: Finally write command git push origin master as shown below and then git will ask for your bit bucket account password as shown below:

git push origin master

Git will take some time to push code to bit bucket.

Login to your bit bucket account and then open the repository click on Commits in left to check your commit as shown below in the diagram:

check commit in git bash


  1. A lot of thanks for shred guy . Keep continue sharing .

  2. It's really an informative article.thanks for your tutorial. Very easy steps you have posted.

  3. Nice post.Thanks a lot for sharing with us this excellent tutorial.

  4. Hey ,
    It's an wonderful post you have published here . Keep continue sharing .

  5. I'm really so happy to be here for this most useful post.It's really so much needed post for everyone.Thanks

  6. Great information. This works great for me. Thanks for sharing this :)

  7. It's a good article thanks for sharing this blog it give lots of information.