Git Goin For Newbs

06/24/20141 Min Read — In Ops

Wrote this up for my partner, taking intro to HTML & CSS at School of Visual Concepts. You don't have to be a Git master to leverage it for your projects. git init freely!

Enough Git to Get Going

  • If you are accessing one that already exists
    git clone

  • If you need to start a new one
    git init

  • Once you have it, check what is up with it
    git status

  • If you have stuff that needs to be added
    git add *

  • If you have changes that you don't want to keep but you want to save
    git stash

  • If you have changes you want to keep
    git commit -m "Do a message"

  • If you want to see what the difference is on a file
    git diff

  • To get new commits from the remote
    git pull

  • To push your new commits to the remote
    git push

  • To see your commit log
    git log

We will worry about branching, cherry picking, reseting, merging later.