mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-06-02 15:10:37 +00:00
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:
3
.zshrc
3
.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
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[user]
|
||||
name = YOUR_NAME
|
||||
signingkey = YOUR_SSH_SIGNING_KEY
|
||||
|
||||
Reference in New Issue
Block a user