LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-psykorebase

Rebase a branch onto another using a single merge commit

TLDR

Rebase current branch onto another using a merge commit
$ git psykorebase [primary_branch]
copy
Rebase a specific branch onto another
$ git psykorebase [primary_branch] [secondary_branch]
copy
Force a merge commit even if fast-forward is possible
$ git psykorebase [primary_branch] --no-ff
copy
Continue after resolving conflicts
$ git psykorebase --continue
copy

SYNOPSIS

git psykorebase primary-branch [secondary-branch] [--no-ff]git psykorebase --continue

DESCRIPTION

git psykorebase rebases a branch onto another by checking out the primary branch, branching from it, and merging the secondary branch in with a single generated merge commit, rather than replaying every individual commit like `git rebase` does. This git-extras command avoids re-resolving the same conflict once per commit, at the cost of collapsing the rebase into one merge point.If the merge conflicts, it leaves a temporary `<secondary>-rebased-on-top-of-<primary>` branch checked out and tells you to resolve the conflict and commit, then run `git psykorebase --continue` to finish renaming the branches into place.

PARAMETERS

PRIMARY-BRANCH

Branch to rebase onto.
SECONDARY-BRANCH
Branch being rebased; defaults to the current branch.
--no-ff
Force a merge commit instead of a fast-forward.
-c, --continue
Resume after manually resolving a conflict.

INSTALL

aptsudo apt install git
copy
dnfsudo dnf install git
copy
pacmansudo pacman -S git
copy
apksudo apk add git
copy
zyppersudo zypper install git
copy
brewbrew install git
copy
nixnix profile install nixpkgs#git
copy

CAVEATS

Part of git-extras. Because it uses one merge instead of replaying commits, individual commit-level history from the secondary branch relative to the primary is not preserved the way an interactive rebase would.

SEE ALSO

RESOURCES

Copied to clipboard
Kai