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:
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:
Step 3: Use git init command to initialize the directory as shown in the diagram below:
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:
Step 5: Right click on git bash and then paste as shown in diagram below:
Step 6: To add the file for commit use command git add * as shown in diagram below:
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.
Step 8: Now execute command git commit -m "your comment" as shown below:
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 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: