<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Git on To Linux and beyond !</title>
    <link>https://home.regit.org/tags/git/</link>
    <description>Recent content in Git on To Linux and beyond !</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <lastBuildDate>Tue, 07 Aug 2012 09:37:15 +0000</lastBuildDate>
    <atom:link href="https://home.regit.org/feed/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Run a build on all commits in a git branch</title>
      <link>https://home.regit.org/2012/08/run-a-build-on-all-commits-in-a-git-branch/</link>
      <pubDate>Tue, 07 Aug 2012 09:37:15 +0000</pubDate>
      <guid>https://home.regit.org/2012/08/run-a-build-on-all-commits-in-a-git-branch/</guid>
      <description>&lt;p&gt;Sometime, you need to check that all the commits in a branch are building correctly. For example, when a rebase has been done, it is possible you or diff has made a mistake during the operation. The building operation can be run against all commits of the current branch with the following one-liner (splitted here for more readability):&lt;/p&gt;
&lt;pre&gt;for COMMIT in $(git log --reverse --format=format:%H origin/master..HEAD); do
    git checkout ${COMMIT} ;
    make -j8 1&gt;/dev/null || { echo &#34;Commit $COMMIT don&#39;t build&#34;;  break; }
done
&lt;/pre&gt;
&lt;p&gt;The idea is trivial, we build the list of commits with &lt;em&gt;git log&lt;/em&gt; using a simple format string (to get only the hash). We add the reverse tag to start from the oldest commit.&lt;br&gt;
For each commit, we checkout and run the build command. If the build fails, we exit from the loop.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Splitting and shrinking a git repository</title>
      <link>https://home.regit.org/2010/08/splitting-and-shrinking-a-git-repository/</link>
      <pubDate>Mon, 02 Aug 2010 19:53:20 +0000</pubDate>
      <guid>https://home.regit.org/2010/08/splitting-and-shrinking-a-git-repository/</guid>
      <description>&lt;p&gt;I have recently faced the challenge to rewrite a &lt;a href=&#34;http://git-scm.com/&#34;&gt;git&lt;/a&gt; repository. It has two problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First problem was small: an user has commited with a badly setup git and E-mail as well as username were not correctly set.&lt;/li&gt;
&lt;li&gt;Second problem seems more tricky: I was needing to split the git repository in two different one. To be precise on that issue, from the two directories at root (src and deps) have to become the root of their own repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I then dig into the doc and it leads me directly to ‘filter-branch’ which was the solution of my two problems. The names of the command is almost self-explanatory: it is used to rewrite branches.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
