Last active
December 14, 2015 02:59
-
-
Save robjshaw/5017372 to your computer and use it in GitHub Desktop.
git basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # create ssh key https://help.github.com/articles/generating-ssh-keys | |
| # create repo https://github.com/new | |
| git init | |
| git add . | |
| git commit -m "Initial commit" | |
| git mv README.rdoc README.md | |
| git commit -a -m "Improve the README" | |
| git remote add origin https://github.com/username/sample_app.git | |
| git push -u origin master | |
| # move to a branch | |
| git checkout -b static-pages | |
| # switch back to master and merge changes of branch | |
| git checkout master | |
| git merge static-pages | |
| # push to github | |
| git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment