Assuming you're in a package foo's directory and you just made a change that you want to amend/fixup to the previous commit (e.g. forgot to bump release number, last rebuild before submission that changed the pspec build date), you can run the following to create a fixup commit that's associated with the last commit performed to this package:
# fixup commit last commit in directory
git commit --fixup $(git log -1 --format="%h" -- .)
For example, if the last commit for in this package's directory is foo: update to 1.4, then your fixup commit would be something like
fixup! foo: update to 1.4
and when you run git rebase --autosquash (or choose fixup manually in git rebase -i), your fixup commit would be amended to its previous commit. You can keep stacking up fixup commits and they will all get amended in the creation order to the initial target commit.
Assuming you're in a package
foo
's directory and you just made a change that you want to amend/fixup to the previous commit (e.g. forgot to bump release number, last rebuild before submission that changed the pspec build date), you can run the following to create a fixup commit that's associated with the last commit performed to this package:For example, if the last commit for in this package's directory is
foo: update to 1.4
, then your fixup commit would be something likeand when you run
git rebase --autosquash
(or choosefixup
manually ingit rebase -i
), your fixup commit would be amended to its previous commit. You can keep stacking up fixup commits and they will all get amended in the creation order to the initial target commit.