Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git & Github 101

Git & Github 101

Slides for talk at Untangle the Web 8/4/2013 @ Google Campus

Sam Mason

April 05, 2013
Tweet

More Decks by Sam Mason

Other Decks in Technology

Transcript

  1. Install Head over to http://git-scm.com/ Download and run installer gui

    / apps Tower for OSX Github app OSX & Windows
  2. Initialize git init Creates the necessary hidden git files within

    a project / repo, only needs to be ran once per project
  3. Add git add . or index.html Enables git to become

    aware of files and folders within a project Can either add all files and folders using dot or individual files Still just observing from afar
  4. Commit git commit -m “A message” Most frequently used command

    Takes a snapshot of your code at that point in time Allows you to add a descriptive message Can commit all files or a select few
  5. Push git push Only used when working with remote servers

    Uploads all of your commits to server Will only push commits
  6. Pull git pull Only used when working with remote servers

    Will pull/ download any commits from remote server Attempts to merge two versions
  7. Branching Allows you to split your code so you can

    work on another version separately without it messing up your master branch. Master Branch --> <-- Feature Branch
  8. Making git cool Allows collaborating on projects as simple as

    a couple of clicks of a button Comes with some awesome extra features FREE (for public repos)