Ignoring commits when merging
- From
- Mike Strauch <mike.strauch@hannonhill.com>
- Date
- Aug 17, 2010, 20:21 UTC
- Message-ID
- <AANLkTi=B9gsroJS_6SRqa2CLQOed2UguxN7KiFtFWL8t@mail.gmail.com>
Hi,
I'm fairly new to git and I'm trying to figure out the best way to ignore certain commits when merging one branch into another. I've found a solution that suggests that I merge everything before the commit I want to skip, then merge the commit I want to skip using the "ours" merging strategy, then merge everything after the skipped commit. This sounds like an adequate solution to the problem, but I'm wondering if there's a better way to do it.
I was thinking that I could just cherry-pick the few commits that I want from Branch 2 in order to exclude the commit I don't want, but this will result in there being no link between the branches for those commits. Are there any other ways this can be done?
-- Mike Strauch www.hannonhill.com