4 ms·
I mentally categorise `commit --amend` right there next to rebase personally. When people debate about rebasing and rewrite of history, I include `--amend`. May
by cnity 4y ago
I mentally categorise `commit --amend` right there next to rebase personally. When people debate about rebasing and rewrite of history, I include `--amend`. Maybe I'm unique there though.
- seba_dos1 4y ago--amend is conceptually nothing else than interactive rebase to squash the last two commits together.
- Dylan16807 4y agoConceptually that's not really a rebase, because you're using the same base. If you never push the original commit, --amend is the same as staging things repeatedly for safety but only hitting the "commit" button later in the day.
- seba_dos1 4y agoHa, "conceptually" is perhaps a wrong word. What I meant is that you end up doing the exact same operation, just via a shortcut in the UI. It's the exact same operation I use interactive rebase for most often in my everyday work, just limited to a single commit (HEAD).
- RadiozRadioz 4y agoThe "is it rewriting history?" boundary for me is whether you're amending a local commit or one that exists on the remote.
- daneel_w 4y agoI personally separate that particular type of revisioning/amending of history (e.g. someone overwriting some WIP commit over and over on their work branch) from rebasing, which to me primarily means reconciling with changes elsewhere in a different branch - figuratively rebasing the changes from over there to here.