feat(git): default pull to rebase

Add pull.rebase to git/config template and simplify git_clean to rely on it.
This commit is contained in:
2026-05-25 11:17:51 +08:00
parent 9779226abd
commit af3fdb86ee
2 changed files with 4 additions and 2 deletions

3
.zshrc
View File

@@ -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

View File

@@ -1,6 +1,9 @@
[init]
defaultBranch = main
[pull]
rebase = true
[user]
name = YOUR_NAME
signingkey = YOUR_SSH_SIGNING_KEY