Skip to content

Instantly share code, notes, and snippets.

@paneru-rajan
Created October 23, 2017 09:02
Show Gist options
  • Save paneru-rajan/49c517c851790df9f2692e549b30c2b3 to your computer and use it in GitHub Desktop.
Save paneru-rajan/49c517c851790df9f2692e549b30c2b3 to your computer and use it in GitHub Desktop.
[Initialize Github repo] From existing project #github #init #setup

to create repo on github click

Follow step there

Initilize

git init

Create .gitignore file and update as required.

It is recommended that every repository include a README, LICENSE, and .gitignore*.

touch .gitignore
touch README.md
touch LICENSE

Add Existing Repo or Replace origin of existing one

git remote add origin https://paneru-rajan@github.com/paneru-rajan/repo-name.git
git config --local remote.origin.url https://paneru-rajan@github.com/paneru-rajan/repo-name.git

Set User Email and Name

git config --local user.name 'Rajan Paneru'
git config --local user.email 'paneru.rajan@gmail.com'

View all Config details

git config -l

Finally Add, Commit and Push

git add .
git commit -m 'Initial Commit'
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment