git - Revert after merge --squash -


i have webapp new feature has been merged down develop branch , ready merged master , deployed there. it's rather complicated feature , need able cleanly revert if behaves unexpectedly.

i'm planning this:

git checkout master git merge --squash develop git commit -m 'merged...etc' 

all easy enough , straightforward. , if need rollback, i'm hoping able merely this:

git checkout master git revert head 

however if necessary, need fix issue in develop , re-merge @ later date. , read in git revert:

reverting merge commit declares never want tree changes brought in merge. result, later merges bring in tree changes introduced commits not ancestors of reverted merge

which suggests might not able re-merge same code @ later date. or use of --squash mean not considered merge commit (as commit separate transaction) , can re-merge in future.

so i'm looking clarification on whether viewed merge commit git, or not.

linus torvalds can explain better i.

tl;dr: merge changes in after reverted merge, need revert revert (or maybe different).

that said, in case, wont create merge commit. merge commit has 2 (or more) parents. git merge --squash && git commit create commit 1 parent.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -