Skip to content

Instantly share code, notes, and snippets.

@mikaelvesavuori
Created September 3, 2023 19:47
Show Gist options
  • Save mikaelvesavuori/9e2b4ad911a21d652d82091ff976e367 to your computer and use it in GitHub Desktop.
Save mikaelvesavuori/9e2b4ad911a21d652d82091ff976e367 to your computer and use it in GitHub Desktop.
Various Git commands to inspect code.
git log -S <string>
git log -p <FILE>
git log --pretty --abbrev-commit — <FILE>
git log --pretty=format:"%h %ad %an - %s" --abbrev-commit -- <FILE>
git bisect start
git bisect bad
git bisect good
git bisect reset
git blame -ewM <FILE>
git blame -ewM -L 1,3 <FILE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment