Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewmccullough/3172582 to your computer and use it in GitHub Desktop.
Save matthewmccullough/3172582 to your computer and use it in GitHub Desktop.
Git and GitHub Free Class Notes from 2012-07-24

2012-07-24 Basics of Git and GitHub Class Notes

Notes from the free Getting Started class and Office Hours

https://github.com/training/free

Resources

Slides:
https://speakerdeck.com/u/matthewmccullough https://speakerdeck.com/u/matthewmccullough/p/the-basics-of-git-and-github

RefCard Cheat Sheet:
http://refcardz.dzone.com/refcardz/getting-started-git

Recommended Free Git Book:
http://git-scm.com/book

Workshop PDFs:
https://github.com/githubtraining/git-workshop

Shell Prompt Enhancements:
http://ambientideas.com/blog/index.php/2010/11/zshell-prompt-for-git/ (which links to the Bash ones)

and the uber-set:
https://github.com/matthewmccullough/scripts
which includes all my OSS work for shell scripts.

As a command line productivity framework, I've become quite attached to oh-my-zsh. It has git-enhanced prompts galore.
https://github.com/robbyrussell/oh-my-zsh

Git Bookmarks:
http://delicious.com/matthew.mccullough/git

GitHub (Hub) Plugin for Git:
https://github.com/defunkt/hub

Great GitHub help pages:
http://help.github.com

Office Hours:
Any follow up Git or GitHub questions can be asked in a desktop-sharing webinar and chat room:
https://github.com/training/free

Thanks again for your attendance.

Sincerely,
Matthew McCullough & Jared Koumentis
GitHub Training
Services: http://github.com/training
Repositories: http://github.com/githubtraining

Command History

git --version

git init project3
cd project3

ls -al

vim first.txt
ls
git add *.txt
git add .
git add first.txt
git commit -m"My first commit"
vim first.txt
git status
git add first.txt
git commit -m"My second commit"
git log
git log -p

gitk 
cd ..
clear
git clone git@github.com:matthewmccullough/hellogitworld.git
cd hellogitworld
git checkout -b overhaul-training-july
ls
vim src/Main.groovy
git status
git add src/Main.groovy
git commit -m"Added full training team"
git push -u origin overhaul-training-july
git checkout master
git checkout -b overhaul-training-august
git add src/Main.groovy
vim src/Main.groovy
git add .
git commit -m"August is THE month"
git push -u origin overhaul-training-august
vim src/Main.groovy
git add .
git commit -m"July is THE month"
git push
git checkout master
git ls-remote https://github.com/ShepBook/hellogitworld-1/
git fetch https://github.com/ShepBook/hellogitworld-1 refs/pull/2/head
git merge FETCH_HEAD
git push origin master
clear
git log
ls
open src
git status
git add -u .
git status
git commit -m"Watch me remove this"
git push
git push origin master
git log
git checkout 2a9338b68b1938f59ca652d47a47169094f1b5e5 -- src/Main.groovy
git show 2a9338b68b1938f59ca652d47a47169094f1b5e5:src/Main.groovy
clear
git pull
git checkout master
git status
git checkout master
git reset --hard
clear
git pull
cd ..
clar
clear
cd hellogitworld
clear
git checkout -b rutisworkbranch
vim src/Sum.groovy
git add .
git commit -m"Saving it locally"
git push -u origin rutisworkbranch
git fsck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment