Saturday, 15 January 2011

How to git rebase when the commit history is not straight but merged from several programmer -



How to git rebase when the commit history is not straight but merged from several programmer -

i have commit history like: , , want . edit: history starts @ bottom, on top newer commits.

i'd rebase/squash these commits onto "here". or 1 before "here" acceptable.

edit: did were:

i'm @ commit "a" git rebase -i here set words "squash", leaving first "pick" unchanged it said error: not apply c148 ....

and it's unusual right after step 2, editor popped-up git rebase listed commits on bluish line, commits on reddish line not there.

how should prepare this?

ps: think this answer may useful. graphic explanation?

you can utilize interactive rebase this:

git rebase -i here^

in editor pops alter text pick in front end of every commit s. leave top commit (here) unchanged - needs have pick.

git rebase

No comments:

Post a Comment