mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
9a8aed1bfd
You have a feature branch with a few commits. Your teammate reviewed the branch and pointed out a few bugs. You have fixes for the bugs, but you don't want to shove them all into an opaque commit that says fixes, because you believe in atomic commits. Instead of manually finding commit SHAs for git commit --fixup, or running a manual interactive rebase, do this: > git add $FILES_YOU_FIXED > git absorb > git rebase -i --autosquash master git absorb will automatically identify which commits are safe to modify, and which indexed changes belong to each of those commits. It will then write fixup! commits for each of those changes. You can check its output manually if you don't trust it, and then fold the fixups into your feature branch with git's built-in autosquash functionality. PR: 235436 Submitted by: Greg V <greg@unrelenting.technology>
10 lines
440 B
Plaintext
10 lines
440 B
Plaintext
This is a port of the hg absorb plugin to git.
|
|
|
|
git absorb will automatically identify which commits are safe to modify,
|
|
and which indexed changes belong to each of those commits. It will then
|
|
write fixup! commits for each of those changes. You can check its output
|
|
manually if you don't trust it, and then fold the fixups into your
|
|
feature branch with git's built-in autosquash functionality.
|
|
|
|
WWW: https://github.com/tummychow/git-absorb
|