Git exclude a commit in a branch
Posted
by becomingGuru
on Stack Overflow
See other posts from Stack Overflow
or by becomingGuru
Published on 2010-03-25T22:49:40Z
Indexed on
2010/03/25
22:53 UTC
Read the original article
Hit count: 481
I have a commit, I have stored in a branch, because this should go only to a specific box.
I have merged it to the branch master, but not the branch dev, that I use locally.
Now, by mistake I merged master to dev and that introduced this commit to dev.
I know can git revert sha, to branch dev; but since this is going to introduce a commit that undoes that commit (I am guessing, I haven't exactly tried this), when I merge master, will this commit be undone too?
If so, how do I undo this commit only from the branch dev.
And oh, git reset HEAD^1
--hard is not an option because there are other commits on master, after the un-needed commit.
If reset back again and apply is the only option, then how do I only merge those extra commits from master other than the un-needed commit.
Thanks in advance!
© Stack Overflow or respective owner