<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>openATTIC (Posts about git)</title><link>/</link><description></description><atom:link href="https://openattic.org/categories/git.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Thu, 22 Aug 2019 20:00:55 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Clean up and split your branch with git</title><link>https://openattic.org/posts/clean-up-and-split-your-branch-with-git/</link><dc:creator>Stephan Mueller</dc:creator><description>&lt;div&gt;&lt;p&gt;There are several reasons why you may need completely refactor your
working branch. The most common one is that you stumbled upon some
things you fixed along your way resolving an issue. Your branch will
grow over time until you are finished. Now you want to submit your code.
You have to split it up into digestible pieces and maybe have to
rewrite some WIP commits you made. Luckily we are using git!
With git you can do it with a few commands with a safety belt on!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://openattic.org/posts/clean-up-and-split-your-branch-with-git/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>community</category><category>contributing</category><category>development</category><category>git</category><guid>https://openattic.org/posts/clean-up-and-split-your-branch-with-git/</guid><pubDate>Tue, 02 May 2017 09:12:05 GMT</pubDate></item><item><title>Branch Name Reorganisation</title><link>https://openattic.org/posts/branch-name-reorganisation/</link><dc:creator>Lenz Grimmer</dc:creator><description>&lt;div&gt;&lt;p&gt;Now that we've &lt;a class="reference external" href="https://openattic.org/posts/openattic-code-repository-migrated-to-git/"&gt;concluded our migration to git&lt;/a&gt;, we also made some changes to our
branch naming scheme.&lt;/p&gt;
&lt;p&gt;In the Mercurial age, we had two main branches:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;development&lt;/tt&gt;: the active development branch, used by developers to derive
their feature branches from and which was used as the target branch for &lt;a class="reference external" href="https://bitbucket.org/openattic/openattic/pull-requests/"&gt;pull
requests&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;default&lt;/tt&gt;: the branch that nightly release builds and official releases were
built from. This branch was updated by merging &lt;tt class="docutils literal"&gt;development&lt;/tt&gt; into
&lt;tt class="docutils literal"&gt;default&lt;/tt&gt; by Jenkins jobs that performed a wide range of automatic tests
against the &lt;tt class="docutils literal"&gt;development&lt;/tt&gt; branch. Only if these tests had passed, an
automatic merge to the &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; was performed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;During the conversion from Mercurial to git, the &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; branch was
automatically renamed to &lt;tt class="docutils literal"&gt;master&lt;/tt&gt;, which is the canonical name for the "main"
repository branch in git. For most open source projects, the &lt;tt class="docutils literal"&gt;master&lt;/tt&gt; branch
resembles the current line of development, similar to how we used the
&lt;tt class="docutils literal"&gt;development&lt;/tt&gt; branch in Mercurial.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://openattic.org/posts/branch-name-reorganisation/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>community</category><category>contributing</category><category>development</category><category>git</category><guid>https://openattic.org/posts/branch-name-reorganisation/</guid><pubDate>Mon, 10 Apr 2017 16:32:49 GMT</pubDate></item><item><title>Use Nikola from a developer point of view</title><link>https://openattic.org/posts/use-nikola-from-a-developer-point-of-view/</link><dc:creator>Volker Theile</dc:creator><description>&lt;div&gt;&lt;p&gt;If you want to create or modify a oA blog post, then this short introduction
will show you how to do this without the need to read howto's about Nikola.
You will be able to setup a virtual environment within seconds to avoid
polluting your Python installation and your Git repository on your development
system.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://openattic.org/posts/use-nikola-from-a-developer-point-of-view/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>blog</category><category>git</category><category>nikola</category><guid>https://openattic.org/posts/use-nikola-from-a-developer-point-of-view/</guid><pubDate>Mon, 10 Apr 2017 09:01:35 GMT</pubDate></item><item><title>openATTIC code repository migrated to git</title><link>https://openattic.org/posts/openattic-code-repository-migrated-to-git/</link><dc:creator>Lenz Grimmer</dc:creator><description>&lt;div&gt;&lt;p&gt;From the very beginning, the &lt;a class="reference external" href="https://bitbucket.org/openattic/openattic/"&gt;openATTIC source code repository&lt;/a&gt; was managed using the &lt;a class="reference external" href="https://www.mercurial-scm.org/"&gt;Mercurial&lt;/a&gt; distributed source control management tool.&lt;/p&gt;
&lt;p&gt;Our code is hosted on &lt;a class="reference external" href="https://bitbucket.org"&gt;BitBucket&lt;/a&gt; which provides for a
tight integration with our &lt;a class="reference external" href="https://tracker.openattic.org/"&gt;public Jira issue tracker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Unfortunately, Mercurial is somewhat less flexible than git when it comes to
using branches to separate ongoing development work (which is a workflow
encouraged by using Jira/BitBucket) - there is a tight relationship between
branch names across repositories and it's impossible to delete branches once
they have been created or merged. Sure, we could have probably used &lt;a class="reference external" href="https://www.mercurial-scm.org/wiki/Bookmarks"&gt;Mercurial
bookmarks&lt;/a&gt; for this, but they
are not well supported by the Jira and BitBucket workflows we are using (and are
more designed to be used locally, not across multiple repositories).&lt;/p&gt;
&lt;p&gt;In addition to that, we have a growing developer/contributor base that simply is
more familiar with git than Mercurial nowadays. Switching to git could
potentially help us attracting a bigger number of developers.&lt;/p&gt;
&lt;p&gt;These were the main reasons for our decision to convert. Thankfully, with the
help of the &lt;a class="reference external" href="https://github.com/frej/fast-export"&gt;fast-export utility&lt;/a&gt;, the
actual conversion was straightforward and painless. It automatically renamed the
former &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; branch to &lt;tt class="docutils literal"&gt;master&lt;/tt&gt;, to be conforming to established git
practices. We will revisit the branch naming conventions in a following step.&lt;/p&gt;
&lt;p&gt;There was some cleanup work involved afterwards, to remove all the obsolete
branches that were created by Mercurial when merging pull requests.&lt;/p&gt;
&lt;p&gt;Additionally, all pending &lt;a class="reference external" href="https://bitbucket.org/openattic/openattic/pull-requests/"&gt;pull requests&lt;/a&gt; from the previous
Mercurial repo had to be re-created, but that provided us with a good
opportunity to clean up the commit history before submitting them. Going
forward, we intend to also make use of the more advanced features of git like
rebasing or squashing change sets, to have a cleaner revision history with less
noise.&lt;/p&gt;
&lt;p&gt;We're now in the process of updating our &lt;a class="reference external" href="http://docs.openattic.org/"&gt;documentation&lt;/a&gt; and build scripts to support this change, but
this should not take us too long to resolve.&lt;/p&gt;&lt;/div&gt;</description><category>contributing</category><category>development</category><category>git</category><category>mercurial</category><category>opensource</category><guid>https://openattic.org/posts/openattic-code-repository-migrated-to-git/</guid><pubDate>Wed, 05 Apr 2017 13:16:20 GMT</pubDate></item><item><title>Moved this blog to git and BitBucket</title><link>https://openattic.org/posts/moved-this-blog-to-git-and-bitbucket/</link><dc:creator>Lenz Grimmer</dc:creator><description>&lt;div&gt;&lt;p&gt;This blog is built a static web site, powered and managed by the excellent
&lt;a class="reference external" href="https://getnikola.com/"&gt;Nikola&lt;/a&gt; static web site generator.&lt;/p&gt;
&lt;p&gt;The motivation for using a static blog was to make writing articles more
straightforward for our developers, without introducing unnecessary media breaks
and barriers. Using this framework, one can contribute content using familiar
tools and workflows.&lt;/p&gt;
&lt;p&gt;When we initially created this blog in September 2015, we used &lt;a class="reference external" href="https://www.mercurial-scm.org/"&gt;Mercurial&lt;/a&gt; for managing the source files and assets and
hosted the repository on an internal Mercurial host.&lt;/p&gt;
&lt;p&gt;This has now been changed - we moved the source &lt;a class="reference external" href="https://bitbucket.org/openattic/openatticblog"&gt;code repository&lt;/a&gt; to BitBucket, as part of the
&lt;a class="reference external" href="https://bitbucket.org/openattic/"&gt;openATTIC umbrella project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We also converted the repository from Mercurial to &lt;a class="reference external" href="https://www.git-scm.com/"&gt;git&lt;/a&gt; along the way, primarily as an exercise to evaluate
how easy such a conversation can be performed, but also as a first step to give
us a way to practice our git skills and to further open up our development
processes.&lt;/p&gt;
&lt;p&gt;The conversion was performed on a local development system using the
&lt;a class="reference external" href="https://github.com/frej/fast-export"&gt;hg-fast-export&lt;/a&gt; Python script and was
quite simple, following the steps outlined in the &lt;tt class="docutils literal"&gt;README.md&lt;/tt&gt; file:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ mkdir openatticblog.git
$ cd openatticblog.git
$ git init
$ ../fast-export/hg-fast-export.py -r ../openatticblog.hg
&lt;/pre&gt;
&lt;p&gt;Afterwards, the git repo could easily be pushed to BitBucket.&lt;/p&gt;
&lt;p&gt;BTW, if you take a closer look at this repo, you will notice there's a branch
named &lt;tt class="docutils literal"&gt;website&lt;/tt&gt;. This is a work in progress project to convert the existing
openattic.org web site from &lt;a class="reference external" href="https://typo3.org/"&gt;Typo3&lt;/a&gt; to Nikola.&lt;/p&gt;
&lt;p&gt;While the content is shaping up nicely, the layout and design still needs some
more attention before we will make the switch. If you're familiar with creating
web sites using Nikola and Bootstrap and want to give us a hand, please &lt;a class="reference external" href="http://openattic.org/get-involved.html"&gt;let us
know&lt;/a&gt;!&lt;/p&gt;&lt;/div&gt;</description><category>bitbucket</category><category>blog</category><category>community</category><category>development</category><category>git</category><category>mercurial</category><guid>https://openattic.org/posts/moved-this-blog-to-git-and-bitbucket/</guid><pubDate>Sat, 11 Feb 2017 09:09:43 GMT</pubDate></item></channel></rss>