<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Sam Wilson: git</title>
		<link>https://samwilson.id.au/git.rss</link>
		<description>Posts about &#039;git&#039; from Sam Wilson.</description>
		<language>en-GB</language>
		<generator>MediaWiki 1.44.0</generator>
		<lastBuildDate>Wed, 17 Jun 2026 11:02:27 GMT</lastBuildDate>
		<item>
			<title>Backporting multiple changes with git review</title>
			<link>https://samwilson.id.au/Backporting_multiple_changes_with_git_review</link>
			<guid>https://samwilson.id.au/Backporting_multiple_changes_with_git_review</guid>
			<description>&lt;div class=&quot;mw-content-ltr mw-parser-output&quot; lang=&quot;en-GB&quot; dir=&quot;ltr&quot;&gt;&lt;p class=&quot;tpl-post&quot; style=&quot;font-size:smaller; text-align:right&quot;&gt;&lt;strong&gt;&lt;span title=&quot;Location&quot;&gt;&lt;i&gt;Fremantle&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;time datetime=&quot;2025-08-24T05:52:00+00:00&quot;&gt;&lt;a href=&quot;https://samwilson.id.au/2025&quot; title=&quot;2025&quot;&gt;2025&lt;/a&gt; August 24 (Sunday), 1:52PM&lt;/time&gt;&lt;/strong&gt;&lt;br /&gt;&amp;#183;&amp;#160;&lt;a href=&quot;https://samwilson.id.au/MediaWiki&quot; title=&quot;MediaWiki&quot;&gt;MediaWiki&lt;/a&gt;&amp;#160;&amp;#183;&amp;#160;&lt;a href=&quot;https://samwilson.id.au/Git&quot; title=&quot;Git&quot;&gt;Git&lt;/a&gt;&amp;#160;&amp;#183;&lt;/p&gt;
&lt;p&gt;MediaWiki extensions often follow a &#039;release branch&#039; &lt;a href=&quot;https://www.mediawiki.org/wiki/Compatibility#MediaWiki_extensions_and_skins&quot; class=&quot;extiw&quot; title=&quot;mw:Compatibility&quot;&gt;strategy&lt;/a&gt; of maintaining compatibility with MediaWiki core. This means that there&#039;s a Git branch in an extension that matches each core version. The idea is that development happens on the &lt;code&gt;master&lt;/code&gt; branch, and every six months a release branch such as &lt;code&gt;REL1_44&lt;/code&gt; is created (based on &lt;code&gt;master&lt;/code&gt;). Then, the only additional commits that happen on the release branch are for security or compatibility purposes, and are either applied directly or are cherry-picked from &lt;code&gt;master&lt;/code&gt;.
&lt;/p&gt;&lt;p&gt;I find two aspects of this a little bit annoying: Firstly, the speed of development of an extension is often much higher than that of core (as it should be; core shouldn&#039;t be a thing that&#039;s changing all that much). And secondly, it&#039;s not hard to introduce incompatibilities into the master branch of an extension. The latter seems to happen a bit, but is most annoying when a change adds some incompatibility, and then a subsequent change fixes it, but the normal way to backport these doesn&#039;t work because you have to add them separately and CI fails.
&lt;/p&gt;&lt;p&gt;The trick is to add them as a merge commit. (Or at least, that&#039;s what I reckon… it doesn&#039;t seem to be a very popular approach, so maybe this is all Bad Advice.) It goes something like the following, assuming &lt;code&gt;master&lt;/code&gt; has a few commits that are needed on &lt;code&gt;REL1_44&lt;/code&gt;.
&lt;/p&gt;
&lt;div class=&quot;mw-highlight mw-highlight-lang-bash mw-content-ltr&quot; dir=&quot;ltr&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# First make sure everything&amp;#39;s up to date, and switch to a new branch based on the release branch:&lt;/span&gt;
git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;remote&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;update
git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;checkout&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-b&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;update1-44&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;gerrit/REL1_44
&lt;span class=&quot;c1&quot;&gt;# Then create a merge commit with everything new from master:&lt;/span&gt;
git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;merge&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--no-ff&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;gerrit/master
&lt;span class=&quot;c1&quot;&gt;# Then upload the change for review, targeting the release branch:&lt;/span&gt;
git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;review&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;REL1_44
&lt;/pre&gt;&lt;/div&gt;
&lt;style data-mw-deduplicate=&quot;TemplateStyles:r6049&quot;&gt;.mw-parser-output .mdl-post-syndications{margin:3em 0;font-style:italic}.mw-parser-output .mdl-post-prevnext{border-top:thin solid #aaa;display:flex;justify-content:space-between;clear:both}&lt;/style&gt;&lt;div class=&quot;mdl-post-syndications&quot;&gt; &lt;/div&gt;&lt;div class=&quot;mdl-post-prevnext&quot;&gt;&lt;a href=&quot;https://samwilson.id.au/Another_%27RSS_is_good%27&quot; title=&quot;Another &amp;#39;RSS is good&amp;#39;&quot;&gt;← Previous&lt;/a&gt;&lt;a href=&quot;https://samwilson.id.au/S1283&quot; title=&quot;S1283&quot;&gt;Next →&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #efefef; font-size:smaller; padding: 0.1em 1em; margin:3em 0 0 0; border-top:thin solid #aaa; clear:both&quot;&gt;
&lt;p&gt;&lt;span class=&quot;plainlinks&quot;&gt;&lt;span style=&quot;border-bottom:2px solid #E05B36&quot;&gt;&lt;span typeof=&quot;mw:File&quot;&gt;&lt;a href=&quot;https://samwilson.id.au/news.rss&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;https://files.samwilson.id.au/thumb/7/74/Feed-icon.svg.png/20px-Feed-icon.svg.png&quot; decoding=&quot;async&quot; width=&quot;16&quot; height=&quot;16&quot; class=&quot;mw-file-element&quot; srcset=&quot;https://files.samwilson.id.au/thumb/7/74/Feed-icon.svg.png/40px-Feed-icon.svg.png 1.5x&quot; data-file-width=&quot;128&quot; data-file-height=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/span&gt; My main RSS news feed: &lt;a rel=&quot;nofollow&quot; class=&quot;external free&quot; href=&quot;https://samwilson.id.au/news.rss&quot;&gt;https://samwilson.id.au/news.rss&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;(or &lt;a rel=&quot;nofollow&quot; class=&quot;external text&quot; href=&quot;https://samwilson.id.au/Wikimedia.rss&quot;&gt;Wikimedia.rss&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; class=&quot;external text&quot; href=&quot;https://samwilson.id.au/Fremantle.rss&quot;&gt;Fremantle.rss&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; class=&quot;external text&quot; href=&quot;https://samwilson.id.au/OpenStreetMap.rss&quot;&gt;OpenStreetMap.rss&lt;/a&gt;, etc. for topic feeds).&lt;/span&gt;&lt;br /&gt;
Email me at &lt;code&gt;sam &lt;span typeof=&quot;mw:File&quot;&gt;&lt;a href=&quot;https://samwilson.id.au/File:@_symbol.svg&quot; class=&quot;mw-file-description&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/%40_symbol.svg/20px-%40_symbol.svg.png&quot; decoding=&quot;async&quot; width=&quot;11&quot; height=&quot;11&quot; class=&quot;mw-file-element&quot; srcset=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/%40_symbol.svg/40px-%40_symbol.svg.png 2x&quot; data-file-width=&quot;300&quot; data-file-height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/span&gt; samwilson.id.au&lt;/code&gt; or leave a comment below…
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
			<pubDate>Sun, 24 Aug 2025 05:52:00 GMT</pubDate>
			<dc:creator>Sam Wilson</dc:creator>
			
		</item>
</channel></rss>