Table of Contents

Handy Git Commands

See Changes

Show names of files that changed between last commit and the working directory.

git diff --name-only HEAD

Show names of files that changed between the last two commits.

git diff --name-only HEAD HEAD~1

concise one-line log

git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s"

Orphaned/Unrelated Branches

git checkout --orphan <orphaned branch name to create>
git rm -rf .
git commit --allow-empty -m "Initial commit of an unrelated (orphan) branch"
git push -u origin <branch name>