Skip to content

Instantly share code, notes, and snippets.

@RaHughes
Last active May 24, 2019 07:28
Show Gist options
  • Save RaHughes/899376c9f787e6451b861cc92ee32b5e to your computer and use it in GitHub Desktop.
Save RaHughes/899376c9f787e6451b861cc92ee32b5e to your computer and use it in GitHub Desktop.

Introduction

Git is what's called a Version Control System that allows users to track of changes to files and projects over time. Many different companies use Git such as Amazon, and Facebook. Git allows multiple users to track, change, and upload to a project from different locations.

Time for some Lists

What does Git allow users to do again?

  1. Make changes, or Commits to a project.
  2. Push those commits to the repository on Github
  3. Other users can then pull those commits from Github onto their computers
  4. Make additional changes to project and push them back on to the repository

Now here's that same list again, but in Bullet form Git allows user to

  • Make changes to a project
  • Push those changes to the repository kept on Git
  • Other users can then.... I'm just kidding. On to the next thing.

Git commands

Here are a few commands you can use in Git

  • 'git diff' This allows you to check the changes made to a file

  • 'git status' This allows you to see whether a file has been comitted or not roughly

  • 'git commit' This allows you to commit a file

  • 'git commit -m' This allows you to commit a file with a footnote attached to it

    This is just an example of what would show up if you use the 'git status' command '''ogerhughes~/git_homework[master x+]$ git status On branch master Your branch is up to date with 'origin/master'.

Changes to be committed: (use "git reset HEAD ..." to unstage)

new file:   best_animals

Changes not staged for commit: (use "git add/rm ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)

deleted:    best_animals'''

Here's what the logo look like, just so you know what to look for alt text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment