Skip to content

Instantly share code, notes, and snippets.

@johndbritton
Created October 25, 2012 00:53
Show Gist options
  • Save johndbritton/3949862 to your computer and use it in GitHub Desktop.
Save johndbritton/3949862 to your computer and use it in GitHub Desktop.
Git + GitHub at Virginia Tech
mkdir vt
cd vt
ls -alh
git init
ls -ahl
cd .git/
ls
rm -rf hooks
cd vt/.git/
tree
~/gitscripts/historytail
touch README
ls
rm README
cd ..
ls
touch README
ls
git add README
touch foo
git add foo
rm foo
git status
git rm foo
git status
ls
git commit -m 'add a readme'
git ls-tree 543bebd
git ls-tree 543b9
mkdir js
git status
git add js
rm -rf js
cd vt
ls
git log
~/gitscripts/generaterandomchanges 3 main rb
git checkout 024b7b3
ls
git checkout 333ad99
ls
cat .git/refs/heads/master
git branch
git checkout master
git branch
git branch feature-x
git branch
git checkout feature-x
git branch
ls
subl .
git status
git add main3.rb
git status
git commit -m 'spec out a new feature'
touch switch
git add switch
git status
git checkout master
git status
git checkout feature-x
git rm switch
git status
git rm switch --force
git status
ls
git checkout master
git checkout feature-x
git checkout 024b7b3
git checkout feature-x
~/gitscripts/generaterandomchanges 3 new-feature-imple rb
git checkout maste
git checkout master
git status
git add main2.rb
git commit -m 'fix a bug'
git checkout feature-x
git status
git add main3.rb
git commit -m 'finish implementation'
git checkout master
git merge feature-x
git branch
git branch -d feature-x
git branch -d master
git checkout d419f86
git branch -d master
git status
git branch master
git status
git checkout master
git status
~/gitscripts/treelive
cat ~/gitscripts/git-graphlive
clear
ls
git status
git checkout -b conflict
git status
git branch
subl .
git status
git add main3.rb
git commit -m 'setting up for a conflict'
git checkout master
git status
git add main3.rb
git status
git commit -m 'improving things'
git branch
git merge conflict
git status
git status
git add main3.rb
git status
git commit
git help
git help merge
git status
git add main3.rb
git status
git reset HEAD
git status
git reset --hard HEAD
git status
git checkout HEAD
git checkout master
git reset --hard HEAD
git branch -d conflict
git branch
ls -alh
ls
ls
rm -rf README main* new*
ls
ls -lah
git checkout master
ls
ls
ls
git log
ls
ls
git reset --hard master
ls
git remote add origin [email protected]:johndbritton/vt.git
git push origin master
git help push
git checkout -b long-running-feature
~/gitscripts/generaterandomchanges 4 foo js
git checkout master
subl .
git status
git add main1.rb
git commit -m 'bugfix'
git checkout long-running-feature
git rebase -i master
cd vt
git checkout HEAD@{6}
git reset HEAD@{6}
git log
~/gitscripts/git-graphlive
git reset --hard HEAD@{6}
git status
git checkout master
git status
touch a b c d e
ls
git status
git commit -m 'asdf'
git add a b c
git commit -m 'abc
git commit -m 'abc'
git status
git log
git status
git diff
git add d e
git diff
ls
git diff --cached
touch a
touch q
nano q
git diff
git diff
git status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment