X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.gitconfig;h=e855a541cb57e7bdff055f31867c87f446c7d335;hb=53a75d7bcc5e01415493ad41affc8022151ea802;hp=8c2f04054602eeaf5879f5b76feb30e0198a8537;hpb=43f1c1115d4bf42ce69852a9514dc351264524fd;p=dotfiles.git diff --git a/.gitconfig b/.gitconfig index 8c2f040..e855a54 100644 --- a/.gitconfig +++ b/.gitconfig @@ -68,7 +68,7 @@ # See https://blog.filippo.io/git-fixup-amending-an-older-commit/ # This is a slightly modified version - fixup = "!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET && GIT_EDITOR=true exec git rebase --interactive --autosquash $TARGET~; }; f" + fixup = "!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET && GIT_EDITOR=true exec git rebase --interactive --autostash --autosquash $TARGET~; }; f" ### remote ### @@ -163,7 +163,7 @@ lr1 = log --decorate --reverse --oneline lr5 = log --decorate --reverse -5 null-merge = merge --strategy=ours - rbi123 = "!f() { exec git rebase --interactive $1 $2 ${3:-\"@{upstream\\}\"}; }; f" + rbi123 = "!f() { exec git rebase --interactive --autostash $1 $2 ${3:-\"@{upstream\\}\"}; }; f" rbi = !exec git rbi123 '' '' rbia = !exec git rbi123 --autosquash '' rbiap = !exec git rbi123 --autosquash --preserve-merges @@ -178,6 +178,9 @@ sw = show --word-diff --decorate unstage = reset HEAD -- + pr = "!f() { git fetch ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" + clean-pr = "!git checkout master ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" + [branch] autosetuprebase = always