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:

  1. use git revert remove each commit branch.
  2. use git cherry-pick reapply commits in order want.

push these changes. lets change order of commits without changing history.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -