mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
fuzzy git reset
This commit is contained in:
parent
7970d36fa9
commit
59160eb247
@ -22,8 +22,8 @@ function gittools
|
||||
--height 50% \
|
||||
--preview 'git show --color=always (echo {} | cut -d" " -f4)' \
|
||||
)
|
||||
and set commit (echo $commitline | cut -d" " -f1)
|
||||
and git checkout $commit
|
||||
and set commit (echo $commitline | cut -d" " -f4)
|
||||
and echo $commit
|
||||
end
|
||||
|
||||
function git-checkout-fuzzy
|
||||
@ -87,6 +87,13 @@ function gittools
|
||||
echo "Not a fuzzy option."
|
||||
return 1
|
||||
end
|
||||
case "reset"
|
||||
set commit (git-commits)
|
||||
and if test "$argv[2]" = "--hard"
|
||||
git reset --hard $commit
|
||||
else
|
||||
git reset $commit
|
||||
end
|
||||
case "*"
|
||||
echo "No fuzzy option."
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user