Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laryn/5f595b7111d38d3807a818c672c8f29e to your computer and use it in GitHub Desktop.
Save laryn/5f595b7111d38d3807a818c672c8f29e to your computer and use it in GitHub Desktop.

Backdrop Core Merging Guidelines

Set up your repo for committing

Check your Git config settings to ensure you have the right name/email for your committing process.

git config --get-regexp user

Set up a remote to the core repository. I use "backdrop" as the remote name to distinguish it from my personal fork, which might be called "origin". That way I don't accidentally push up to origin and affect the Backdrop history.

git remote add backdrop git@github.com:backdrop/backdrop.git

To Merge an Individual Issue:

  1. Find issue via RTBC (https://github.com/backdrop/backdrop-issues/issues?q=is%3Aopen+is%3Aissue+label%3A%22pr+-+ready+to+be+committed%22+)
  2. Use "Squash and Merge" button so you can both simplify commit history, make it easier to revert, and also change the commit message to clean it up. Commit message should be Issue #: Short(ish) message. We do not require the less than 80 character messages. Messages should be written as a sentence, starting with a capital letter and with a period.
Issue #3286: Add primary tabs as color option in Basis.

  1. While merging include credits in the extended description if there are multiple people, @ mentioning each person. Any person that reported, tested, filed a PR, or had meaningful contribution should be included.
By @herbdool and @oadaeh.
  1. If this fix should go into the current version: On your local, checkout 1.x and git pull. Then switch to 1.[minor-version] branch and cherry-pick the commit into the minor release.
# Make sure 1.11.x is up-to-date
git checkout 1.11.x
git pull backdrop 1.11.x

# Pull down latest commits on 1.x.
git fetch backdrop
git cherry-pick [commit-hash]
git push backdrop 1.11.x
  1. In the PR, post a commit saying the commit has been merged into 1.x and 1.[minor-version] branches.
Thank you! Merged into 1.x and 1.11.x.
  1. And go over the related issue. Post a full thank you to all involved. And indicate which PR was merged and into which branches it was merged.
Thank you @herbdool and @oadaeh! Merged https://github.com/backdrop/backdrop-issues/issues/3286 into 1.x and 1.11.x.
  1. Updating issues tags as appropriate (e.g. removing RTBC and adding Fixed) and updating milestone (if necessary).

Script to simplify (from @bwpanda)

To make it easier for me, I added the following to my personal .bash_aliases file:

# Backdrop core merging
function bmerge {
  git checkout "$1" && \
  git pull backdrop "$1" && \
  git fetch backdrop && \
  git cherry-pick "$2" && \
  git push backdrop "$1"
}

Now I can just go bmerge 1.16.x [commit-hash] 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment