From af3fdb86ee5ec4c8a71147610f831c4003643e5b Mon Sep 17 00:00:00 2001 From: Li Tang Date: Mon, 25 May 2026 11:17:51 +0800 Subject: [PATCH] feat(git): default pull to rebase Add pull.rebase to git/config template and simplify git_clean to rely on it. --- .zshrc | 3 +-- git/config | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 1ebce38..271e13b 100644 --- a/.zshrc +++ b/.zshrc @@ -322,8 +322,7 @@ function git_clean() { fi git checkout "$base_branch" && \ - git config pull.rebase false && \ - git pull --rebase && \ + git pull && \ git branch --merged | grep -v " $base_branch$" | xargs git branch -d 2>/dev/null; \ git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D 2>/dev/null; \ git worktree prune --verbose diff --git a/git/config b/git/config index 9be7591..296f724 100644 --- a/git/config +++ b/git/config @@ -1,6 +1,9 @@ [init] defaultBranch = main +[pull] + rebase = true + [user] name = YOUR_NAME signingkey = YOUR_SSH_SIGNING_KEY