Skip to content

Instantly share code, notes, and snippets.

@nickfloyd
Created September 20, 2011 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfloyd/1229517 to your computer and use it in GitHub Desktop.
Save nickfloyd/1229517 to your computer and use it in GitHub Desktop.
Setting up a local repo and pushing to github
Global setup:
Set up git
git config --global user.name "FirstName LastName"
git config --global user.email youremail@gmail.com
Next steps:
mkdir test
cd test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:yourname/test.git
git push -u origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@github.com:yourname/test.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment