Setting up a GitHub account and git repository

Image source

Whenever we say a project or application development. There is Version control and source code management/storage system is included.

Version Control means, managing your source code locally and storage means centralised system that manages code and enables multi-user support to the work/project. A single project may have worked by n number of people. So, all the code commits from all developers could be managed with source code management system.

We are focusing here about Git as VCS and Github as centralised system. This is a two step process to fully enable a Git-GitHub project.

  1. Creating a project in GitHub: You need to sign up to and verify in order to create a repository. GitHub allows you to create any number of public repository and a limited private repository. Once you verified your email, Click on + icon at top right corner, near user profile.
  • Select ‘New repository’
  • Give a name for repository
  • Choose if it is private or public, and create repository.\

You are done with step 1.

2. Maybe you already created project? Or else create a project. In the project root directory, execute below commands.

git init
git add *
git commit -m "first commit"
git remote add origin https://github.com/[[username]]/[[repo]].git
git push -u origin master

PS: If you have some other git repo and if you want to push that repo to your account, execute the below command.

git remote add origin https://github.com/[[username]]/[[repo]].git
git push -u origin master

Start-up and tech enthusiast. I write about Tech, Devops and anything related.

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