Last active
April 7, 2022 19:38
-
-
Save dezman/a9ee6dd5fcabca8f4548 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Search | |
git grep potato | |
# Local config | |
git config --list --show-origin | |
git config user.email potato | |
# GPG | |
gpg --list-keys | say | |
gpg --armor --export | say | |
git config --global commit.gpgsign true | |
git config user.signingkey potato | |
git config --global alias.logs "log --show-signature" | |
# A more detailed git log | |
git log -p | |
# A shorter status | |
git status -s | |
# List modified files | |
git ls-files -m | |
# Search all git branches for string or regex | |
git rev-list --all | xargs git grep potato | |
# Apply a recalcitrant git patch | |
git apply --reject --whitespace=fix ~/path/to.patch | |
# Express --intent-to-add, so you can view the diff or do other things with untracked files | |
git add -N . | |
# Stash unstaged changes | |
git stash -k | |
# Search all commit messages | |
git log --all --grep=potato | |
# Git blame some lines | |
git blame path/to/file.ext -L 42,+10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment