<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>branches Archives &#8211; Structured Procrastination</title>
	<atom:link href="https://blog.adamspiers.org/tag/branches/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.adamspiers.org/tag/branches/</link>
	<description>because there&#039;s always something more interesting than what you should be doing</description>
	<lastBuildDate>Tue, 19 Jun 2018 13:18:19 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://blog.adamspiers.org/wp-content/uploads/2018/12/cropped-IMG_20160907_193859-PANO-c-7-32x32.jpg</url>
	<title>branches Archives &#8211; Structured Procrastination</title>
	<link>https://blog.adamspiers.org/tag/branches/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</title>
		<link>https://blog.adamspiers.org/2018/06/14/git-auto-magic/</link>
					<comments>https://blog.adamspiers.org/2018/06/14/git-auto-magic/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 14 Jun 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[backporting]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forward-porting]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[upstreaming]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1655</guid>

					<description><![CDATA[<p>For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous HackWeek policy to work on building four tools supporting higher-level workflows on top of git. I&#8217;d already (quietly) announced three of them: git-splice, git-transplant, git-deps (more details below). But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: git-explode ! [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous <a href="https://hackweek.suse.com/about">HackWeek</a> policy to work on building four tools supporting higher-level workflows on top of <code>git</code>.  I&#8217;d already (quietly) announced three of them: <code>git-splice</code>, <code>git-transplant</code>, <code>git-deps</code> (more details below).  But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: <a href="https://github.com/aspiers/git-explode"><code>git-explode</code></a> ! </p>
<p> <code>git-explode</code> automatically explodes a large topic branch into a set of smaller, independent topic branches.  It does this by harnessing <code>git-deps</code> to automatically detect inter-dependencies between commits in the large source branch and using that dependency tree to construct the smaller topic branches. </p>
<p> I recently presented all four tools at a Meetup of the <a href="http://londongit.org/">Git London User Group</a>, and thanks to the awesome services of the host venue <a href="https://skillsmatter.com/">Skills Matter</a>, I&#8217;m delighted to announce that the <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">talk is now online</a>: </p>
<div class="figure">
<p><a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic" width="99%" align="center" alt="video of my talk on git auto-magic at the Git London User Group Meetup" title="my talk on git auto-magic at the Git London User Group Meetup"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2018/06/automagic.png" alt="video of my talk on git auto-magic at the Git London User Group Meetup" width="99%" align="center" title="my talk on git auto-magic at the Git London User Group Meetup" /></a> </p>
</p></div>
<p> If you don&#8217;t have time to watch the whole thing, you can look at <a href="https://aspiers.github.io/london-git-automagic-may-2018/">the slides</a>, or just keep on reading to see which ones you might be interested in.  I&#8217;ll list them first, and then talk about the motivation for writing them. </p>
<p><span id="more-1655"></span></p>
<div id="outline-container-orge9751bc" class="outline-2">
<h2 id="orge9751bc">The tools</h2>
<div class="outline-text-2" id="text-orge9751bc">
<p> The first pair are available as patches to <code>git</code> itself: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/git/git/compare/master...aspiers:splice">git-splice</a> &#8211; splices commits onto/into/out of current branch </p>
<p> Jump to 08:44 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/splice-transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/splice/Documentation/git-splice.txt">read the man page</a> for example usage. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git/compare/splice...transplant">git-transplant</a> &#8211; transplants commits from current branch onto/into another </p>
<p> Jump to 32:22 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/transplant/Documentation/git-transplant.txt">read the man page</a> for example usage. </p>
</li>
</ul>
<p> The second pair are available as Python modules on PyPI, but both have a command-line interface too: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/aspiers/git-deps">git-deps</a> &#8211; automatically detects textual dependencies between commits </p>
<p> Jump to 41:28 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/deps">look at the slides</a>, or <a href="https://github.com/aspiers/git-deps/blob/master/README.md">read the README</a> (which has a couple of short YouTube videos demoing the tool including the fancy web interface), or read <a href="https://blog.adamspiers.org/git-deps">my previous blog post about this</a>. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git-explode">git-explode</a> &#8211; explodes a linear sequence of git commits into new independent topic branches </p>
<p> Jump to 51:10 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/firework">look at the slides</a>, or <a href="https://github.com/aspiers/git-explode/blob/master/README.rst">read the README</a>. </p>
</li>
</ul>
<p> It&#8217;s taken a while to get them to a reasonable degree of polish, during which this work has been mostly under the radar, but now I&#8217;m now going to make a more concerted effort to advertise the tools, hence this blog post. </p>
</div>
</div>
<div id="outline-container-org7927f37" class="outline-2">
<h2 id="org7927f37">The Big Idea</h2>
<div class="outline-text-2" id="text-org7927f37">
<p> (Jump to 02:27 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me talk about this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/problems">look at the slides</a>.) </p>
<p> All developers face common problems: </p>
<ul class="org-ul">
<li>It&#8217;s difficult to predict what you&#8217;ll be doing next.  One minute you might be working on a feature, the next you find a bug you need to fix, and the next you find some technical debt which requires refactoring.</li>
<li>Multi-tasking is almost unavoidable.</li>
<li>We&#8217;re human, so we sometimes screw up when trying to follow best practice workflow.</li>
</ul>
<p> What does this mean when using <code>git</code>?  Typically it means we are constantly juggling branches, and often need to manipulate the history of branches for various reasons, for example: </p>
<ul class="org-ul">
<li>Maintaining clean separation of topics between branches to facilitate code reviews: one branch for a refactoring, one for a bugfix, one for a feature, and so on.</li>
<li><a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">Backporting or forward-porting series of patches between branches.</a></li>
</ul>
<p> My feeling is that while the <code>git</code> ecosystem has continued to evolve incrementally over the last few years, not much progress has been made in terms of automating this janitorial work, and that most people either do it by hand, or don&#8217;t bother doing it at all.  This leads to unclean history, and/or more work and frustration for reviewers. </p>
<p> So I wrote these tools (<a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">and others</a>) in an attempt to push the boundaries of automating git workflows to higher levels, <a href="https://public-inbox.org/git/20170801011421.veyuviur3mi4hjir@pacific.linksys.moosehall/">as I explained on the <code>git</code> mailing list last year</a>.  Even if all the use cases they can cover have yet to be discovered, I hope you find them useful, or at least thought-provoking enough that you might join the effort! </p>
<p> I&#8217;d love some feedback, so do let me know what you think in the comments below. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2018%2F06%2F14%2Fgit-auto-magic%2F&#038;title=git%20branch%20auto-magic%3A%20git-splice%2C%20git-transplant%2C%20git-deps%2C%20and%20announcing%20git-explode%21" data-a2a-url="https://blog.adamspiers.org/2018/06/14/git-auto-magic/" data-a2a-title="git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2018/06/14/git-auto-magic/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
	</channel>
</rss>
