Skip to content

Instantly share code, notes, and snippets.

@dweekly
Created July 26, 2013 05:50
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 dweekly/6086598 to your computer and use it in GitHub Desktop.
Save dweekly/6086598 to your computer and use it in GitHub Desktop.
How to set up a new repository with GitHub
# This sounds a little ridiculous but reliably setting up a new repository on GitHub
# with some initial local source was a little more involved than I expected.
# Visit https://github.com/new and create your repo PROJECT name.
# Now cd to your project directory. You should be at the top level.
git init
git remote add origin git@github.com:USERNAME/PROJECT.git
git branch --set-upstream master origin/master
git pull
# at this point you might need to resolve any .gitignore or README.MD conflicts you might have.
git push
# TADA! You should be able to see your source at github.com/USERNAME/PROJECT now!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment