Advanced git-checkout

This commit is contained in:
Andrew Tomaka 2023-05-25 21:18:04 -04:00
parent de5a133313
commit 8bd52e2017
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,13 @@
function advanced-git-checkout {
if [ $# -eq 0 ]; then
git branch \
| fzf \
| xargs -I {} git checkout {}
else
git checkout $@
fi
}
function ag-count {
if [ $# -lt 1 ]; then
echo Usage: ag-count SEARCHTERM