Git rebase

up:: Git
To rebase all unpushed changes:

git rebase -i @{upstream}

Fixup

Fixup lets you associate a new commit with a previous commit. When you do an interactive rebase, you don’t have to reorder and manually squash the commit.

git commit --fixup <SHA>

Automating

From Fixing commits with git commit —fixup and git rebase —autosquash | Jordan Elver

# .gitconfig
[alias]
  fixup = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"

Merge only specific commits

git checkout target-branch
git rebase -i source-branch