From 443199366549019d7369c879bce3dc332c1034fe Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 31 Jan 2026 11:09:18 +0100 Subject: [PATCH] pgit.sh pull: Rebase target branch before merge Before merging the remote branch, do a rebase. This may fail and prompt conflict resolution, but that seems the canonical outcome for the common use case "interactive make git pull-xxx" with master out-of-sync. Signed-off-by: Jan Lindemann --- scripts/pgit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/pgit.sh b/scripts/pgit.sh index cfb9dd71..462bfc48 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -182,6 +182,7 @@ clone() run_git -C $p fetch --prune --recurse-submodules=on-demand $remotename $fromref run_git -C $p submodule foreach --recursive 'git fetch --tags -f origin' if [ "$toref" ]; then + run_git -C $p rebase $remotename/$fromref $toref run_git -C $p merge --ff-only $remotename/$fromref $toref fi else