I'm trying to manage our Moodle instance on our own branch of the Moodle repo. I checked out tag "v1.9.11" of branch "MOODLE_19_STABLE", then copied that to a new branch "COE", where I've added in our custom theme, etc.
Now that tag "v1.9.12" exists, I want to merge the commits up to that tag into my "COE" branch (and not the commits that came after).
Can I do this with something like git cherry-pick?
Roughly speaking, you use git rebase -i to get the original commit to edit, then git reset HEAD^ to selectively revert changes, then git commit to commit that bit as a new commit in the history.
@learner a Tag identifies a specific commit. You can't merge into a specific commit so you'd need to move the tag to the commit you want.
First we run git checkout master to change the active branch back to the master branch. Then we run the command git merge new-branch to merge the new feature into the master branch. Note: git merge merges the specified branch into the currently active branch.
$ git merge v1.9.12
will merge all the commits up to, and including, v1.9.12
, and nothing after that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With