Search lessons

Suggested searches

Browse

Git Reference

These are all of the commands that we will most likely use. See Git Cheatsheet.pdf for more detailed information.

Terminal Commands

  • ls/dir - view everything in current folder (ls for bash, dir for command prompt)
  • cd - change folder (directory)
  • cd .. - go back one folder

Git Commands (Note: You have to be in the folder of the Github repo to use any commands other than clone)

  • git clone LINK - downloads the Github repository to the current directory (The LINK should be obtained from the green clone/download button
  • git status - displays the status of the current Github repository
  • git add . - adds all changes in this folder to the stage
  • git add -a - add all changes to the stage
  • git commit -m "MESSAGE" - puts all of the changes on the stage into a commit
  • git push - pushes all commits to online
  • git pull - update your local code with changes from the online repository
  • git checkout BRANCH_NAME - switch to another branch (make a new branch in Github)