Skip to content

Instantly share code, notes, and snippets.

@wallacepreston
Last active July 14, 2020 17:25
Show Gist options
  • Save wallacepreston/bdf3869f5ea5be0b5ebe341e87a3f861 to your computer and use it in GitHub Desktop.
Save wallacepreston/bdf3869f5ea5be0b5ebe341e87a3f861 to your computer and use it in GitHub Desktop.

GIT & GITHUB

Git Setup

First install Git.

Then, in your terminal:

git config --global user.name "Your Name"
git config --global user.email "your_email@real_email.edu"

Use the same email address you set up your GitHub account with.

GITHUB - CREATE A REPO

  • Create a new Repository
  • Copy the URL for the repository (you can simply copy the url bar, or use the green “code” button on the page)
  • In your terminal (on macOS it’s cmd+space, type terminal to find the app).
    • Go to the directory you want to clone your repo inside of (it will create a new directory for you in the clone command).
      • You can move around by using commands like cd <directory-name> to go “into” a new directory and cd .. to go up one
    • type
      • git clone <copied-url-here>
      • for example: git clone https://github.com/wallacepreston/example-repo.git
      • That creates example-repo (or whatever the repo name is) inside the directory you’re in on your computer.
    • Then you can move anything in there that you want to be in that repo on gitHub. Steps from there:
      • git add -A (adds everything in current repo to the staging area)
      • git commit -am “my message” (creates a “version” or commit)
      • git push origin master (puts everything in the repo on github)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment