Skip to content

Instantly share code, notes, and snippets.

@boriscy
Last active March 4, 2021 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boriscy/82f88c409ee8cdc49a8a756ea3dbb74b to your computer and use it in GitHub Desktop.
Save boriscy/82f88c409ee8cdc49a8a756ea3dbb74b to your computer and use it in GitHub Desktop.
List of commands for git

Search content in the history

git grep <regexp> $(git rev-list --all)`
git log -p | grep <pattern>

View history of a folder

git log -- path/to/folder
git log -- path/to/folder/*

Search for a deleted file in history

git log --all --full-history --stat -- "**/*.svelte"

Reverse log

git log --reverse

Show authors

git shortlog -s -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment