How to setup a git repository

Published Jan 01, 2018Last updated Jan 04, 2018

Configure Git for the first time

git config --global "name"`
git config --global "email"

Clone the existing repository

git clone <git-url>

If your code is ready to push

cd existing project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin
git push -u origin master

If your code is already tracked by Git

cd existing-project
git remote set -url
git puhs -u origin master
Discover and read more posts from Santhosh D
get started