public
Last active

KYOSS Git Copy/Paste (beginner)

  • Download Gist
gistfile1.md
Markdown

You will be typing a fair amount into your shell to go with our slides... Here's a convenient place to copy/paste from.

Git Introduction Presentation / Slides:

Recordings of the Presentation:

Google Plus Event:

Next up: Git Intermediate Presentation / Slides:

Installing Git

Setting Up Git

git config --global user.name "Bob Smith"
git config --global user.email "bobsmith@gmail.com"
git config --global color.ui auto
git config --global merge.conflictstyle diff3

(extra: "alan's .gitconfig file":https://github.com/zeroasterisk/home/blob/master/.gitconfig if you're interested)

Many of the Commands

Here are many of the commands from the slides... some this should help you keep up while the slides are going by... at the end they repeat a fair amount... so we only display unique commands.

cd
mkdir git
cd git
mkdir kyoss-git-workshop
cd kyoss-git-workshop
git init
echo 'hello, world' > hello.txt
echo 'goodbye, world' > goodbye.txt
git status
git add hello.txt
git status
git add goodbye.txt
git status
git commit
git commit -m "Add hello/goodbye"
git status
echo "hello again" >> hello.txt
git status
git diff
git commit
git commit -m "add more to hello"

Omitting repeated commands... here are a few from the rest of the slides:

git commit -a -m "Some variety"
git log
git log --oneline
git help add
git help status
git help diff
git help commit
git help log
git show

Setting Up GitHub

Setting Up a Repository in GitHub

Continuing with the Commands

git remote add origin 
git remote add origin git@github.com:jsquyres/kyoss-git-repository-github.git
git push origin master
git push
cd $HOME/git
git clone  my-clone
cd $HOME/git/my-clone
cd $HOME/git/kyoss-git-workshop
git pull
git show HEAD

git log --graph

Bonus Points

  • http://gitref.org/ - Git Reference
  • http://gitready.com/ - Git example walkthroughs, atomic
  • http://goo.gl/Pw0Fz - Git Cheat Sheet
  • tig - an excellent CLI interface to look through logs
  • git-svn - a Git core extension which facilitates integrating Git+SVN
  • git-wtf - a Git script helping identify branch sync status across multiple remotes

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.