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

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix 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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid