Skip to content

Instantly share code, notes, and snippets.

@jatubio
Created May 20, 2015 22:24
Show Gist options
  • Save jatubio/44c768bb301d0653eef4 to your computer and use it in GitHub Desktop.
Save jatubio/44c768bb301d0653eef4 to your computer and use it in GitHub Desktop.
Alias to find files on Git repositories.
### Files
# Find if one file ever had into repository
ff = "!git log --pretty=format: --name-status --all -M -B | sort -u | grep $1 -i #"
# The same as above but showing copied files
ffc = "!git log --pretty=format: --name-status --all -C -M -B | sort -u | grep $1 -i #"
# Show Untracked files on stash
sfu = "!git rev-list -g stash | git rev-list --stdin --max-parents=0 | xargs git show --stat"
# Find files on stash
fsf = "!git rev-list -g stash | xargs -n1 git ls-tree -r | sort -u | grep $1 #"
# Find on content files from stash
fsfu = "!git rev-list -g stash | git rev-list --stdin --max-parents=0 | xargs git grep $1 #"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment