Reputation: 5287
I asked a similar question here recently, but this is a more specific question.
I've cloned a open source project locally (OrchardCMS) & created a local branch (accom.dev) off a tag "1.6" in the origin/master branch in order to add my own tweaks to the codebase.
They have since made a lot of changes to the codebase, moving from 1.6 to 1.7 onto 1.7.1 and have even more commits (the current release is 1.7.1). What I want to do is take everything from the 1.7.1 tag (including everything that goes back to 1.6) and merge it into my local branch. From there I will address conflicts, fix my customizations and then deploy to my website.
Note this is NOT a cherry-pick as I want everything from 1.6 up to 1.7.1 merged into my local branch, BUT I don't want the stuff that has been committed SINCE the 1.7.1 release. IOW, I want my customizations to be based off the official 1.7.1 release, not on more recent stuff.
I'm pretty sure what I did gives me what I want, but I'm not sure if there was a better way:
At this point I am where I want to be, but I'm wondering if there was an easier way...
Upvotes: 0
Views: 104
Reputation: 70135
An easier way is as follows (assumes origin
is the name of your remote and that you have already checked out your accom.dev branch):
$ git fetch --tags origin
From ...
* [new tag] some-tag -> some-tag
* [new tag] ...
$ git merge some-tag
Upvotes: 1