Change gfix abbrev to rebase to default branch

This commit is contained in:
Jakob Lechner 2023-11-22 14:49:37 +00:00
parent 9b4da12f6a
commit e319165063
No known key found for this signature in database
GPG key ID: 996082EFB5906C10

View file

@ -95,16 +95,16 @@
end
'';
};
git_pick-commit_merge-base_origin_master = {
git_pick-commit_merge-base_origin = {
description = "fuzzy find a commit hash";
body = ''
git log --oneline (git merge-base HEAD origin/master)..HEAD | ${pkgs.fzf}/bin/fzf --preview='git show (echo {} | cut -d" " -f 1)' --preview-window=top:75% | cut -d" " -f 1
git log --oneline refs/remotes/origin/HEAD..HEAD | ${pkgs.fzf}/bin/fzf --preview='git show (echo {} | cut -d" " -f 1)' --preview-window=top:75% | cut -d" " -f 1
'';
};
gfix = {
description = "git commit --fixup with fuzzy find commmit picker";
body = ''
set commit (git_pick-commit_merge-base_origin_master)
set commit (git_pick-commit_merge-base_origin)
commandline "git commit --fixup=$commit"
'';
};