Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Last active August 29, 2015 14:07
Show Gist options
  • Save JohnL4/693fd9a775fe82e74db0 to your computer and use it in GitHub Desktop.
Save JohnL4/693fd9a775fe82e74db0 to your computer and use it in GitHub Desktop.
Getting stuff into GitHub
This assumes you've already created a github account.
So, you've created something new and wonderful on your local machine and you want to preserve it into github.
On github, create a repository (with license and readme).
On your local machine:
cd <yourWorkingDirectory> # The root of the Wonderful Thing you created
# (You might want to create a .gitignore file here, but you don't have to.)
git init
git add <file1> <file2> ...
git commit
git remote add origin https://github.com/<yourGithubUserId>/<yourWonderfulGithubProject>
git pull origin master # Pulls down your license and readme files; required to get stuff in sync and keep git happy
git push origin master
And you're done! Congratulations!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment