Skip to content

Instantly share code, notes, and snippets.

@quicksketch
Last active October 23, 2022 23:10
Show Gist options
  • Save quicksketch/d633d8f850fd11b2ef5f222aa0a3b5af to your computer and use it in GitHub Desktop.
Save quicksketch/d633d8f850fd11b2ef5f222aa0a3b5af 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 [email protected]: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+-+reviewed+%26+tested+by+the+community%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.
Copy link

ghost commented Mar 30, 2020

Suggest adding a step at the end about updating an issues tags (e.g. removing RTBC and adding Fixed) and updating milestone (if necessary).

Copy link

ghost commented Aug 13, 2020

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] 🙂

@laryn
Copy link

laryn commented Aug 11, 2021

I like the bmerge alias @bwpanda!

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