GitHub Cheatsheet

GitHub

  • Not equivalent to Git
  • Social media site for storing documents and files
  • Interfaces well with Git
  • Encourages open source workflows
  • Facilitates good project management
  • Can host your own projects
  • Has some esoteric vocabulary that gets in the way

GitHub Cheatsheet

  • $ git clone repo_git_url
    • Makes a clone, or copy of the designated GitHub repository on your local computer.
  • $ git push
    • Take the changes you have made to your current repository and make them available on the GitHub offical record of things. The first time you will have to add other parameters to the command.
  • $ git pull
    • Grab the most up-to-date version of the repository from GitHub and update your local version with them.
  • remote: refers to the address of the thing you’re pushing and pulling from. So when you clone something, you get a remote that points to its home location. You can add others, though, if you wanted to pull from one source and push to another location.
  • commit - a change
  • commit message - describes the change you made

GitHub Exercises

  1. Make a GitHub account
  2. Make a repository of the name USERNAME.github.io where USERNAME is your username
  3. Initialize with readme
  4. Create a new file called index.html
  5. Upload the contents of this page to your index.html file.
  6. Give a commit message at the bottom and commit!
  7. Visit your https://username.github.io to see your page in the wild.
  8. Make another change by going through the workflow.
  9. And another!