Useful Git Commands
May 30, 2022
Commands:
# contributors
git shortlog -sn
git shortlog -sn | head -3
# current commit hash
git rev-parse HEAD
# viewing diffs
git diff *.txt
git diff HEAD~2 HEAD~1
# git logs
git log --author="John Smith" --oneline
# git show
git show
git show HEAD~3
git show commit:path/to/file