- Create a repo
git config --global user.name "Tim Berglund"git config --global user.email "tlberglund@github.com"git config --global color.ui autogit init atlanta
- Add files
- Create caesar.txt
git add caesar.txt
- Commit Files
git commit -m "First commit"
- Look at diffs
git diffgit diff --stagedgit difftoolgit diff --word-diffgit diff HEAD
- Look at history
git loggit log --pretty=rawgit log --prett=emailgit log -1git log --statgit log --patchgit config --global alias.lg log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"
- Branch
git branch featuregit checkout feature
- Merge
git checkout mastergit merge featuregit merge feature --no-commit
- Reflog
git reflog
- Reset
git reset --hard <something>git reset --hard HEAD@{1}
- Log Live Gist
- Win
-
-
Save obstschale/5563497 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment