Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
Created July 26, 2012 20:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthewmccullough/3184371 to your computer and use it in GitHub Desktop.
Save matthewmccullough/3184371 to your computer and use it in GitHub Desktop.
GA Git Class History

GA Git Class Command History

on 2012-07-26

echo STARTING CLASS
git --version
which git
brew update
ls
clear
pwd
git init project1
cd project1
tree .git
git config user.name
git config user.email
git config --list
ls
clear
touch first.txt
ls
ls -a
git add first.txt
git status
git commit -m"My first commit"
vim first.txt
git status
git commit -m"My second commit"
git add .
git status
git commit -m"My second commit"
git status
vim first.txt
git status
git diff
git add -p first.txt
git status
git commit -m"Part of the changes"
git status
git diff
git add first.txt
git status
git commit -m"The rest of the changes"
git status
clear
touch second.txt
touch third.txt
git status
git add second.txt
git status
git commit -m"Second and third files"
git status
git add third.txt
git commit --amend -C HEAD
git status
echo JUNK > first.txt
echo JUNK > second.txt
git reset --hard
git config --global color.ui auto
git log
git log --color-words
git log --color-words -p
git log --stat
clear
git log --stat
git log --summary
git log -p
touch .gitignore
vim .gitignore
git status
git add .gitignore
git commit -m"Ignoring all output logs"
git statsu
git status
touch output/test.rtf
git status
git status -u
vim .gitignore
git status
git log -1
git commit -m"Ignoring all output directory"
git add .gitignore
git commit -m"Ignoring all output directory"
git status
cd output
cd ..
ls
mkdir build
git status
touch build/.gitignore
git status
git add .
git status
git commit -m"Propping open the build dir"
git stats
git status
touch fourth.txt
git status
echo MOD >> second.txt
git status
git add -u .
git status
git add -A .
git status
git reset --hard
git status
rm third.txt
git status
git add -u .
git status
git  commit -m "Getting rid of unnecessary file"
git status
git log -p -1
git add -A .
git status
vim another/uno.txt
git status
git add -A .
git status
clear
git status
git commit -m "Renamed and updated some files"
git status
git log --stat -1
git log --stat -1 -M
git log --stat -1 -M99
git log --stat -1 -M90
ls
cp another/uno.txt yetanothercopy.txt
git status
git add .
git commit -m"Copied a file"
git log --stat -M -1
git log --stat -C -1
git log --stat -C -C -1
clear
git branch feature1
git checkout master
git checkout mfeature1
git checkout feature1
git checkout master
git checkout feature1
touch feature1.txt
git add feature1.txt
git commit -m"Feature started"
git checkout master
git checkout feature1
git checkout master
vim another/uno.txt
git add another/
git commit -m"Production fix"
git status
git checkout feature1
git cherry-pick a034e25
git status
git log -2 --stat
gitx 
ls
vim feature1.txt
git add .
git commit -m"Feature done"
git status
git checkout master
git merge feature1
history
git config --global core.editor 
git config --global core.editor "subl -w"
touch fifth.txt
git add fifth.txt
git commit
git remote add origin https://github.com/matthewmccullough/project1.git
git push -u origin master
git push --mirror origin
cd ..
git clone https://github.com/matthewmccullough/project1.git throwaway
mate ~/.gitconfig
git config --global credential.helper "cache --timeout=300"
git clone https://github.com/githubstudents/hellogitworld.git studenthellogitworld
cd studenthellogitworld
touch matthew9654012sfile.txt
vim matthew9654012sfile.txt
git add .
git commit -m"Changes from Matthew"
git status
git remote -v
git push
git remote add https://github.com/githubtraining/hellogitworld.git
git remote add central https://github.com/githubtraining/hellogitworld.git
git fetch central
git merge central/master
git status
git push
history
mate .git/config
git branch -a
git remote -v
git remote mv origin matthewsfork
git remote rename origin matthewsfork
git remote -v
git branch -a
git remote rename central companyofficialcopy
git branch -a
git l2
cd studenthellogitworld
git l2
git lol
clear
git dcw
clear
git log
git checkout 9928a1d510a738d3cfbf79bbfbd607e9f9abc19b
ls
git log
git tag RELEASE_2.2 f99e613d1f00e8c901bb756e144a7318fa1b8ece
git tag RELEASE_2.3 f99e
git checkout RELEASE_2.3
git checkout master
git checkout RELEASE_2.3 | more
git checkout master
git checkout RELEASE_2.3
open .
gitx
git branch -a
git checkout bisect --track matthewsfork/bisect
git branch bisect --track matthewsfork/bisect
git checkout bisect
ls
mvn test
gitx
git bisect start
git bisect bad HEAD
git bisect good 1f4b39b592bc06957a71d37d9141093a57b6d4ae
git bisect run mvn test
gitk --all
git bisect log
git bisect reset
git checkout master
cd ..
cd project1damaged
git log -1
vim .git/objects/ec/15457ccdbd2732d3da97be580a1f968de33b12
git log
git status
cd ..
cd studenthellogitworld
git ls-remote
git ls-remote | more
git log -1
git tag
git push origin RELEASE_2.2
git remote -v
git push matthewsfork RELEASE_2.2
cd ..
git clone https://github.com/githubtraining/hellogitworld.git squashme
cd squashme
git status
git branch matthew1
git branch matthew2
git checkout matthew1
vim matthew9654012sfile.txt
git add .
git commit -m"matthew 1"
git checkout matthew2
vim matthew9654012sfile.txt
git add .
git commit -m"Matthew 2"
git checkout master
git checkout -b integ
git merge matthew1
git merge matthew2
git config --global core.editor "mate -w"
git merge matthew2
git commit
git checkout master
git merge integ --squash
git log -1
git status
git commit 
git log -1
git history
history
git branch
git branch -D matthew1
git branch -D matthew2
git branch -D integ
git branch
ls
vim README.txt
git status
git stash
git stash list
git status
git checkout -b test
vim README.txt
git add .
git commit -m"Peter change on test branch"
git status
git checkout master
git stash pop 
git add .
git commit -m"This will conflict"
gitx
clear
history
git status
git merge test
mate README.txt
git status
git add README.txt
git status
git commit -m"Merged footer text"
git status
git branch
git branch -d test
gitx
git reset --hard 55e53eb23cdbc6550098ce8904d88b178cf0606c
git reflog
git reset --hardls
ls
git log
git reset --hard HEAD~1
git reflog
git reset --hard HEAD@{4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment