Last active
August 6, 2024 05:17
-
-
Save gidgid/c12f48fb41d6575121b4ab7af6f17ac5 to your computer and use it in GitHub Desktop.
Git aliases with FZF
This file contains hidden or 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
[alias] | |
# more aliases here | |
## "checkout fzf" checkout with fzf | |
cof = "!checkout_fzf() { git branch | fzf | xargs git checkout; }; checkout_fzf" | |
## "add fzf" add multiple files with fzf | |
aaf = "!add_fzf() { git status -s | awk '{print $2}' | fzf -m | xargs git add; }; add_fzf" | |
## "add files and commit" add files with fzf and then immediately commit | |
afc = "!add_files_and_commit() { git status -s | awk '{print $2}' | fzf -m | xargs git add && git commit --verbose; }; add_files_and_commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment