Skip to content

Instantly share code, notes, and snippets.

@robjshaw
Last active December 14, 2015 02:59
Show Gist options
  • Select an option

  • Save robjshaw/5017372 to your computer and use it in GitHub Desktop.

Select an option

Save robjshaw/5017372 to your computer and use it in GitHub Desktop.
git basic
# 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