Learn Working with Git and Bitbucket

In this article, I will explain to you how to work with git and bitbucket.  This is a direct practice example for the beginner

Before starting let’s clear what is git and bitbucket, for this please read below some of the best articles

Step: 1 Download Git and install

Download Git  https://git-scm.com/download and then install.

Download Git and install

No need check anything on the installation process just click next on the whole process.

Step: 2 Create an account at Bitbucket

Create an account at https://bitbucket.org

Create an account at Bitbucket

Step:  3 Run Git Bash

Run Git Bash

Step: 4 Git setup command (Only first time of git setup)

  1. git config –global user.name “Name” g (git config –global user.name “yuvrajkhavad”)
  2. git config –global user.email “your email id” g (git config –global user.email “yuvraj@zindex.co.in”)
  3. ssh-keygen
  4. Press enter without entering any file name.
  5. Enter the two-time password then display a newly generated file path. (Note: This password will use for clone project, push project and pull project).
  6. Open file folder mention in git bash and copy the key from those locations
  7. Then add a key in Bitbucket
    1. Log in to Bitbucket.
    2. Go to View Profile
    3. Click on SSH keys and then Add key.
    4. Paste the key into the text box:
    5. Click Add key. You’re done!
  8. Then create a new project repository and copy the project URL because we have to use at step 5.1

Step: 5 then move the folder to the location where you have to clone project

  1. cd c: (Note: Move-in C directory)
  2. cd test/ (Note: Move to a particular folder of your project)

Step: 5 Clone (copy) project in the local computer (Only first time of starting new project)

  1. git clone <git repo url>   e. g (git clone git@bitbucket.org:zindexsolutions/test.git)
  2. Then type “Yes”
  3. Then enter your password

Step: 6 Regular Commands

  1. git status
  2. git add . / -A                                            g (git add .)
  3. git commit -m “<commit message>” g (git commit -m “First Commit”)
  4. git pull origin <branch name> g (git push origin master) It will copy files bitbucket to local
  5. git push origin <branch name> g (git push origin master) It will upload files local to bitbucket account

It’s done. Let me know have any problem happy to help. Just sent mail at yuvraj@zindex.co.in.

Leave a Reply

Your email address will not be published. Required fields are marked *

author-image

Yuvraj Khavad

Co-Founder, Programmer

I’m Yuvraj Khavad, I work at Z Index Solutions where I am the Co-founder!. I’m also like to read books and draw a painting. I have more than 5 years of experience in web development and web design.

Similar Posts

Trello Tips & Tricks
11/07/2020
Trello Tips & Tricks

What is Trello? Trello is a web-based project & task management tool. Using trello we can do collaborative work with a team member and clients. In another word, trello is […]

Read more