Dyota's blog

Git commands

Make bundle

git bundle create backup.git --all

View history for one file

git log -p -- [filename]

Git log compact

git -C "." --no-pager log --format="%h %as (%ar) %s" -30

List all files ever (source)

git log --pretty=format: --name-only --diff-filter=A | sort -u

Delete one file from git history (sources [1] [2])

py git-filter-repo --invert-paths --path <filepath>

Go back one commit (source)

git reset --hard HEAD~1