Coder Bee
Published in

Coder Bee

How To Set Up A Git Repository?

A Git Repository is a cloud storage for your software

Photo by frank mckenna on Unsplash

This is continuation of Git Basics series.

  1. What is Git?
  2. Know Your Git Terminologies

Local Git Repository:

Setting up a local repository is pretty simple. By local repository I mean making your project a git repo on your work-station.

Open git-bash. Navigate to root of your project folder. In my case it is — android-test.

Sowmya\android-test$ git init

Syncing With a Remote Repository:

Congrats! Now your project is a git repository. If you want to upload it to a remote repository(have a copy in the cloud) you could use a cloud hosting service like github, Gitlab or bitbucket. In my case, I am using a github repo.

So all you need to do is sign up and create a repository in Github.

Copy the https or ssh link to the repository.

$ git remote add origin

If you have cloned a repository using git clone the repository already has the link to the remote repo, so you can skip the previous step of — git init.

To index all your changes,

Commit your changes with an appropriate commit message.

$ git commit -m "Initial Commit"

Issue command push when your ready to push your changes to the remote repository.

$ git push -u origin master

You might need to provide your github credentials and once authenticated your repos will be pushed to your online repository.

Tada! Now you have successfully pushed to a remote repository.


Got a question? Leave a comment.

Originally published at




Coder Bee is an inclusive community oriented coding school focusing on women and underrepresented groups in IT.

Recommended from Medium

Fundamentals — Risk management

Design Patterns — A quick guide to Observer pattern.

LeetCode: Two Sum

[ CheatEngine] Tutorials

what i have been waiting for has come !

Notice —Cosmostation iOS app mnemonic phrase import issue

Weekly Update #4

What I learned from attending the #PerfMatters conference

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sowmya Guru

Sowmya Guru

Freelance Android Engineer. Founder at Buy Me A Coffee if you find my blog useful:

More from Medium

Introducing 140 Second Ducklings: What is Debugging?

Introduction to Version Controlling

TIL 0603 Java Spring_basic DB usage

Understanding Multi-Agent Remote Debugging for Java