<?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>the Saguaros &#187; Open Source</title>
	<atom:link href="https://www.thesaguaros.com/category/open-source/feed" rel="self" type="application/rss+xml" />
	<link>https://www.thesaguaros.com</link>
	<description>Things you will never need from people you&#039;ve never heard about</description>
	<lastBuildDate>Tue, 17 Mar 2026 09:29:46 +0000</lastBuildDate>
	<language>en-EN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.7.41</generator>
	<item>
		<title>More fun with Git</title>
		<link>https://www.thesaguaros.com/more-fun-with-git.html</link>
		<comments>https://www.thesaguaros.com/more-fun-with-git.html#comments</comments>
		<pubDate>Thu, 26 Aug 2010 10:59:10 +0000</pubDate>
		<dc:creator><![CDATA[Domenico]]></dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git articles]]></category>
		<category><![CDATA[git-extras]]></category>
		<category><![CDATA[on-git]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[repos-tools]]></category>

		<guid isPermaLink="false">http://www.thesaguaros.com/?p=176</guid>
		<description><![CDATA[People learning Git usually realize very soon that it can make a lot easier their daily development tasks and collaboration with other developers. This is true even for people proficient with traditional version control systems (like SVN), that lack the advanced branching and merging functionalities typical of modern DVCSes. You can be even more productive [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>People learning Git usually realize very soon that it can make a lot easier their daily development tasks and collaboration with other developers.<br />
This is true even for people proficient with traditional version control systems (like SVN), that lack the advanced branching and merging functionalities typical of modern DVCSes.</p>
<p>You can be even more productive by setting up your client and environment to make it fit better your needs. Here are some tips, based on my configuration, hope you find them useful too!</p>
<h2>Tweaking the configuration</h2>
<h3>Configuration basics</h3>
<p>Every Git repository has a configuration file called <tt>config</tt> located in the <tt>.git</tt> directory. Moreover there&#8217;s a global config file called <tt>.gitconfig</tt> and located in the user&#8217;s home directory.<br />
Options specific to the each repository (eg. remotes and branches configuration) go in <tt>.git/config</tt>, while general options should be put in <tt>.gitconfig</tt>. For instance, I&#8217;ve put my name and email there:</p>
<pre class="brush:bash">[user]
        name = Domenico Rotiroti
        email = xxxxx@xxxx.com
</pre>
<p>Git uses these informations to fill the author&#8217;s data every time I do a commit.</p>
<p>Configuration options can be read and modified by editing the files by hand or using the <tt>git config</tt> command. So I could set my name this way:</p>
<pre>git config --global user.name Domenico Rotiroti</pre>
<p>If you&#8217;re new to git I recommend that you read the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-config.html" target="_blank">git-config</a> man page to see how many things you can configure!</p>
<h3>A prettier output</h3>
<p>One of the most used (and useful) git command is &#8220;diff&#8221;. If you add the <tt>--color</tt> option you will see that removals are printed in red, while additions in green.<br />
<span style="font-family: courier new, monospaced; padding left: 14px"><br />
<span style="color: #00ffff;">@@ -1,6 +1,6 @@</span><br />
#!/usr/bin/env php<br />
&nbsp;&lt;?<br />
<span style="color: #ff6600;">-include(&#8216;utils.inc&#8217;);</span><br />
<span style="color: #339966;">+include(&#8216;repos-tools/utils.inc&#8217;);</span><br />
&nbsp;$vcs = array ( &#8220;git&#8221;, &#8220;svn&#8221;, &#8220;bzr&#8221;, &#8220;hg&#8221; );</span></p>
<p>Nice, isnt&#8217;t it?<br />
If you like it, you can make diff output colored text by default by setting the color.diff option:</p>
<pre>git config --global color.diff auto</pre>
<p>Diff has another nice option, called <tt>--color-words</tt>,  that will show the changed words in a line side-by-side instead of outputting two lines. Personally, I prefer the traditional format, but if you don&#8217;t agree I suggest you to add an alias:</p>
<pre>git config --global alias.wdiff 'diff --color-words'</pre>
<p>With this alias in place, just run &#8216;git wdiff&#8217; to get a word-colored diff.<br />
With aliases you can do a lot of nice things, for instance I found useful to a have an alias with my favorite options for the log command:</p>
<pre>git config --global alias.oneline 'log --oneline --decorate'</pre>
<h2>Extending git</h2>
<p>We&#8217;ve seen that new commands can be added to git using aliases. This is not the only way!<br />
The command line client git acts as a command wrapper: whenever you run &#8220;git <em>somecommand</em>&#8221; it looks for git-<em>somecommand</em> in the path and executes it passing by all the parameters.<br />
Adding new functionalities is really simple, indeed someone already did it! <img src='https://www.thesaguaros.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I recommend you to take a look at <a href="http://github.com/visionmedia">visionmedia</a>&#8216;s git-extras here <a href="http://github.com/visionmedia/git-extras">http://github.com/visionmedia/git-extras</a>, it adds several useful commands.</p>
<h2>repos-tools</h2>
<p>Of course I couldn&#8217;t forget to mention our <a href="http://github.com/drotiro/repos-tools" target="_blank">repos-tools</a>, that could make you save time when working with multiple repositories.<br />
If your repos are on GitHub, you can fork, watch, list issues and more from the command line.</p>
<h2>Goodbye</h2>
<p>For today, that&#8217;s it! Got tips to share? Write us a comment while they&#8217;re open.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.thesaguaros.com/more-fun-with-git.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Meet repos-tools</title>
		<link>https://www.thesaguaros.com/meet-repos-tools.html</link>
		<comments>https://www.thesaguaros.com/meet-repos-tools.html#comments</comments>
		<pubDate>Thu, 29 Jul 2010 12:21:30 +0000</pubDate>
		<dc:creator><![CDATA[Domenico]]></dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[repos-tools]]></category>

		<guid isPermaLink="false">http://www.thesaguaros.com/?p=153</guid>
		<description><![CDATA[Repos-tools is the newborn in theSaguaros&#8217; open source projects. Really it is just a php script, runnable from the shell, to manage your code repositories, doing things on all of them at once. For instance, to stay up-to-date with the changes made by others just run: repost pull Currently it can handle Git, Subversion and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Repos-tools is the newborn in theSaguaros&#8217; open source projects.</p>
<p>Really it is just a php script, runnable from the shell, to manage your code repositories, doing things on all of them at once.</p>
<p>For instance, to stay up-to-date with the changes made by others just run:</p>
<pre>repost pull
</pre>
<p>Currently it can handle Git, Subversion and Bazaar repositories.</p>
<p>Read more at <a href="/open-source/repos-tools">its page</a> and fork it on <a href="http://github.com/drotiro/repos-tools" target="_blank">GitHub</a>.</p>
<p><strong>Update (Aug, 4th):</strong> repos-tools is growing&#8230; I just added a command line client for GitHub and another action to repost. Watch the repository to follow its development!</p>
]]></content:encoded>
			<wfw:commentRss>https://www.thesaguaros.com/meet-repos-tools.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
