github - In Git, how can I reorder (changes from) pushed commits? -
i have repository single (master
) branch:
a > b > e > f > g > c > d
it turns out need changes in c
, d
(two commits toward end of history far) occur earlier, i’d have:
a > b > c > d > e > f > g
everything’s been pushed. understand i’m not supposed rebase pushed commits, can do?
here's quick , dirty solution doesn't change history:
- use
git revert
remove each commit branch. - use
git cherry-pick
reapply commits in order want.
push these changes. lets change order of commits without changing history.
Comments
Post a Comment