<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>Blog entries tagged subversion :: mwop.net</title>
    <description>Blog entries tagged subversion :: mwop.net</description>
    <pubDate>Tue, 15 Mar 2011 15:34:34 -0500</pubDate>
    <generator>Laminas_Feed_Writer 2 (https://getlaminas.org)</generator>
    <link>https://mwop.net/blog/tag/subversion</link>
    <atom:link rel="self" type="application/rss+xml" href="https://mwop.net/blog/tag/subversion/rss.xml"/>
    <item>
      <title>Git Subtree Merging Guide</title>
      <pubDate>Tue, 15 Mar 2011 15:34:34 -0500</pubDate>
      <link>https://mwop.net/blog/258-Git-Subtree-Merging-Guide.html</link>
      <guid>https://mwop.net/blog/258-Git-Subtree-Merging-Guide.html</guid>
      <author>contact@mwop.net (Matthew Weier O'Phinney)</author>
      <dc:creator>Matthew Weier O'Phinney</dc:creator>
      <content:encoded><![CDATA[<p>I've been investigating ways to incorporate third-party repositories and
libraries into my <a href="http://git-scm.org/">Git</a> projects. Subversion's
<code>svn:externals</code> capabilities are one compelling feature for that particular
VCS, and few, if any, other VCS systems, particularly the DVCS systems, have a
truly viable equivalent. Git <code>submodules</code> aren't terrible, but they assume you
want the entire repository — whereas SVN allows you to cherry-pick
subdirectories if desired.</p>
<p>Why might I want to link only a subdirectory? Consider a project with this
structure:</p>
<pre><code class="language- hljs " data-lang="">docs/
    api/
    manual/
        html/
        module_specs/
library/
    Foo/
        ComponentA/
        ComponentB/
tests/
    Foo/
        ComponentA/
        ComponentB/
</code></pre>
<p>On another project, I want to use ComponentB. With <code>svn:externals</code>, this is easy:</p>
<pre><code class="language-ruby hljs ruby" data-lang="ruby">library/Foo/ComponentB <span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/repohost/svn</span><span class="hljs-regexp">/trunk/library</span><span class="hljs-regexp">/Foo/</span>ComponentB
</code></pre>
<p>and now the directory is added and tracked.</p>
<p>With Git, it's a different story. One solution I've found is using
<a href="https://github.com/apenwarr/git-subtree">git-subtree</a>, an extension to Git. It
takes a bit more effort to setup than <code>svn:externals</code>, but offers the benefits
of easily freezing on a specific commit, and squashing all changes into a
single commit.</p>
<p><a href="http://h2ik.co">Jon Whitcraft</a> recently had some questions about how to use
it, and I answered him via email. Evidently what I gave him worked for him, as
he then requested if he could post my guide — which
<a href="http://h2ik.co/2011/03/having-fun-with-git-subtree/">you can find here</a>.</p>




<div class="h-entry">
    <img class="u-photo photo" width="50" src="https://avatars0.githubusercontent.com/u/25943?v=3&u=79dd2ea1d4d8855944715d09ee4c86215027fa80&s=140" alt="matthew">
    <a class="u-url u-uid p-name" href="https://mwop.net/blog/258-Git-Subtree-Merging-Guide.html">Git Subtree Merging Guide</a> was originally
    published <time class="dt-published" datetime="2011-03-10T09:30:00-06:00">10 March 2011</time>
    on <a href="https://mwop.net">https://mwop.net</a> by
    <a rel="author" class="p-author" href="https://mwop.net">Matthew Weier O&#039;Phinney</a>.
</div>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>git-svn Tip: don't use core.autocrlf</title>
      <pubDate>Wed, 24 Sep 2008 12:16:27 -0500</pubDate>
      <link>https://mwop.net/blog/191-git-svn-Tip-dont-use-core.autocrlf.html</link>
      <guid>https://mwop.net/blog/191-git-svn-Tip-dont-use-core.autocrlf.html</guid>
      <author>contact@mwop.net (Matthew Weier O'Phinney)</author>
      <dc:creator>Matthew Weier O'Phinney</dc:creator>
      <content:encoded><![CDATA[<p>I've been playing around with <a href="http://git.or.cz/">Git</a> in the past couple
months, and have been really enjoying it. Paired with subversion, I get the
best of all worlds — distributed source control when I want it (working on new
features or trying out performance tuning), and non-distributed source control
for my public commits.</p>
<p><a href="http://github.com/guides/dealing-with-newlines-in-git">Github</a> suggests that
when working with remote repositories, you turn on the <code>autocrlf</code> option, which
ensures that changes in line endings do not get accounted for when pushing to
and pulling from the remote repo. However, when working with <code>git-svn</code>, this
actually causes issues. After turning this option on, I started getting the
error &quot;Delta source ended unexpectedly&quot; from <code>git-svn</code>. After a bunch of aimless
tinkering, I finally asked myself the questions, &quot;When did this start
happening?&quot; and, &quot;Have I changed anything with Git lately?&quot; Once I'd backed out
the config change, all started working again.</p>
<p>In summary: don't use <code>git config --global core.autocrlf true</code> when using <code>git-svn</code>.</p>




<div class="h-entry">
    <img class="u-photo photo" width="50" src="https://avatars0.githubusercontent.com/u/25943?v=3&u=79dd2ea1d4d8855944715d09ee4c86215027fa80&s=140" alt="matthew">
    <a class="u-url u-uid p-name" href="https://mwop.net/blog/191-git-svn-Tip-dont-use-core.autocrlf.html">git-svn Tip: don&#039;t use core.autocrlf</a> was originally
    published <time class="dt-published" datetime="2008-09-24T12:16:27-05:00">24 September 2008</time>
    on <a href="https://mwop.net">https://mwop.net</a> by
    <a rel="author" class="p-author" href="https://mwop.net">Matthew Weier O&#039;Phinney</a>.
</div>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
  </channel>
</rss>
