Setting Up Git

I forget these steps frequently, so I thought I’d post them.

These come from Github’s new repository page. For the purposes of this, [repo] is the repository name and [user] is your github username.

Next steps:

mkdir [repo]

cd [repo]

git init

touch README

git add README

git commit -m 'first commit'

git remote add origin git@github.com:[user]/[repo].git

git push -u origin master

Existing Git Repo?

cd existing_git_repo

git remote add origin git@github.com:[user]/[repo].git

git push -u origin master

Posted

in

by

Tags: