- Create a repo
git config --global user.name "Tim Berglund"
git config --global user.email "[email protected]"
git config --global color.ui auto
git init atlanta
- Add files
- Create caesar.txt
git add caesar.txt
- Commit Files
git commit -m "First commit"
- Look at diffs
git diff
git diff --staged
git difftool
git diff --word-diff
git diff HEAD
- Look at history
git log
git log --pretty=raw
git log --prett=email
git log -1
git log --stat
git log --patch
git 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 feature
git checkout feature
- Merge
git checkout master
git merge feature
git 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