"George Spelvin" <li...@horizon.com> writes:
> With git's "commit frequently" style, I often find that I end up with a
> commit that includes a typo in a comment or I forgot one call site when
> updating functions or something.
> But it would be really handy if there were a one-step command for doing this.
> Something like "git commit --fixup HEAD~3", where "git commit --fixup HEAD"
> would be equivalent to "git commit --amend".
Umm, --fixup is already taken and makes the subject be 'fixup! <subject
of argument>'. This can then be used by rebase -i --autosquash (or
rebase.autosquash=true) to automatically put the fixup(s) that have
accumulated into the right places. In addition, git-rebase learned to
automatically use the upstream as the default base.
So for me it's usually a matter of
git add -p
git commit --fixup=...
# repeat the above two until all fixups are lined up
git rebase -i
# close editor without making changes
Is that still too much effort?
The ideas discussed in
also help selecting the fixup argument more quickly.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html