<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://basetta.bz/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https://basetta.bz</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>
            This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It's free.
        </tabi:about_feeds>
        <tabi:visit_the_site>
            Visit website
        </tabi:visit_the_site>
        <tabi:recent_posts>
            Recent posts
        </tabi:recent_posts>
        <tabi:last_updated_on>
            Updated on $DATE
        </tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>dotfiles</tabi:current_section>
    </tabi:metadata><title>Basetta&apos;s Website - dotfiles</title>
        <subtitle>Welcome to my personal blog! Find honest reflections, helpful advice, and a fresh perspective on travel, lifestyle, and more. Start exploring now.</subtitle>
    <link href="https://basetta.bz/tags/dotfiles/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://basetta.bz/tags/dotfiles/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2013-01-28T00:00:00+00:00</updated><id>https://basetta.bz/tags/dotfiles/atom.xml</id><entry xml:lang="en">
        <title>Protect Your Private Data Using Gitconfig Include Directive</title>
        <published>2013-01-28T00:00:00+00:00</published>
        <updated>2013-01-28T00:00:00+00:00</updated>
        <author>
            <name>Patrick Martini</name>
        </author>
        <link rel="alternate" href="https://basetta.bz/blog/protect-your-private-data-using-gitconfig-include-directive/" type="text/html"/>
        <id>https://basetta.bz/blog/protect-your-private-data-using-gitconfig-include-directive/</id>
        
            <content type="html">&lt;span id=&quot;continue-reading&quot;&gt;&lt;/span&gt;
&lt;p&gt;I am using a &lt;a rel=&quot;external&quot; href=&quot;https://github.com/basetta/dotfiles&quot;&gt;dotfiles&lt;/a&gt; git repository in order to keep my machine preferences in sync.&lt;/p&gt;
&lt;p&gt;This is working pretty well, until you realise that are some config entries that are clashing with each other.&lt;/p&gt;
&lt;p&gt;One of those cases, is the common situation  of having two github accounts – one for work and one for private purposes. In this case we would like to share the common git configuration but not the committer’s author name and email address held in the .gitconfig.&lt;/p&gt;
&lt;p&gt;Recently, git added a new feature, the include directive for config files ( since 1.7.10 ) that can solve the problem.
With the include feature you can split your gitconfig across multiple files, so you can have the common git configuration in one file, and private information in another.&lt;/p&gt;
&lt;p&gt;Let’s have a look at an example :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add the include directive to your .gitconfig ( this is the file in your git dotfiles repository )&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[include]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;path = ~/.gitconfig_user&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Add to ~/.gitconfig_user your private data&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[user]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;name = Silvio Berlusconi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;email = silvio.berlusconi@bungabunga.it&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Test if the config is working properly&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ git config user.name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Silvio Berlusconi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ git config user.email&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;silvio.berlusconi@bungabunga.it&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        </entry>
</feed>
