NOTES: Advanced Git Training by Github.com
HEAD current commit on current branch
git log
-1 : most recent one (1)
--stat : shows files changed in commit
--patch : shows differences in text
--pretty=oneline : flattens on t one line
--pretty=raw : more detail on commits (tree etc)
--graph : shows history graph
git commmit --ammend
changes commit history (add changes and/or modify message)
show full history including rebased, modified, deleted commits etc (60 days)
git diff
--color-words : shows only word changes in different colors --word-diff : makes word diffs machine parsable
git reset HEAD@{3}
--hard : changes current head to back three commits (can lose files) --mixed : changes head, blows away staging (not touching working tree) --soft : changes only head
git reset --hard
backs out current changes in working tree
creates a new commit that removes a prior commit, use after push instead of rebase
show tree of a commit
pretty print content of commit
adds an alias for a one line log with graph (git lol)
show sha of indicated commit
delete all upstream branches that have been deleted locally
##REBASE
all mean 4 prior to head
git commit --ammend
--ammend : when dropping an edit into a rebase, make changes, add them then ammend
git rebase --continue
--continue : finishes rebase, allows for editing of commit message
git pull --rebase
rebases the pull into current branch
pull now does pull --rebase