At my job, I have the current commit workflow.
I commit a change onto master, then submit for CR (code review).
--EDIT-- NOTE, THE CODE REVIEW PROCESS DOESN'T INVOLVE A PUSH TO ORIGIN, I.E. I AM NOT REWRITING REMOTE HISTORY.
If I do changes to address the CR, I don't make a new commit but I instead use git commit --amend
on the old commit on master.
i.e.
master: A (out for CR) --\
dev: \ -- B.
make changes on A, so now my tree looks like this:
master: A' (modified A created with commit --amend)
dev: A -- B
What I want is an easy way to make it look like
master: A' --\
dev: \-- B
I continue to work on a feature on top of the old one by branching. I can't do a simple rebase because the --amend command deletes the old commit on master.
Right now, what I'm doing is I'm rebasing master and then doing an interactive rebase to delete the old A from the history on dev. Is there a better way?