Steps to add an existing Repository to Github

Somnath Musib
1 min readAug 22, 2019

Via Command Line

A. Create a local Repository

  1. git init
  2. git add .
  3. git commit -am “Commit Message”

B. Create a Github Repository

C. Push local changes to GitHub Repository

  1. git remote add origin <New Repo URL>
  2. git remote -v
  3. git pull origin master — allow-unrelated-histories
  4. git push origin master

--

--

Somnath Musib
Somnath Musib

Written by Somnath Musib

4X AWS | Staff Software Engineer, Cloud Architect | Author "Spring Boot In Practice" | Find more at https://musibs.github.io

No responses yet