Working on Git (private repo)

Git is a version control system. This post is meant for beginners to create a private repo and use it for their projects.


  • First create a git account in (Since it offers free private repo)
  • Then select create a repository and give it a name
  • Your remote repo is now ready

Configure your local workstation

  • Install git bash into your local machine to work with git repositories
  • Configure it for your email and username

$ git config "Mohith G"

$ git config ""


Pushing your local files to Remote repo

  • You have your project ready at /somepath/project/
  • Now cd into that project

$ git init

  • You first need to add your files to your local repo

$ git add filenames

  • Check status of files

$ git status

  • Now ensure your files are ready to commit
  • commit means your files are ready to be put into local repository which means version of file is ready

$ git commit -m "Initial commit"

  • Now files are ready in local repository

Pushing into Remote repo

  • You have the remote repo url created in bitbucket
  • Create origin in remote repo

$ git remote add origin https://yourgitpath.git

  • Now finally push into remote repo

$ git push -u origin master

  • It will ask for your password and yay!! your files are pushed into remote repo.

Cloning from repo – Your peer needs to get files

  • Once your files are submitted into repo your peer who works in your project need to get those files
  • Give him access in bitbucket by sharing the repo with him.
  • Setup your workstation by following the above steps
  • Create a folder into which you need to clone

$ mkdir myproject

$ cd myproject

$ git clone https://yourgitrepo.git

Adding files into your repo

$ git add filenames

$ git commit -m "Description"

$ git push

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s