<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peter Graham on Medium]]></title>
        <description><![CDATA[Stories by Peter Graham on Medium]]></description>
        <link>https://medium.com/@peter_graham?source=rss-a572852ee457------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FB31X1Lr1_LS-Jls.jpg</url>
            <title>Stories by Peter Graham on Medium</title>
            <link>https://medium.com/@peter_graham?source=rss-a572852ee457------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 18:38:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peter_graham/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Create a Personal Gitignore]]></title>
            <link>https://medium.com/@peter_graham/how-to-create-a-local-gitignore-1b19f083492b?source=rss-a572852ee457------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b19f083492b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Peter Graham]]></dc:creator>
            <pubDate>Fri, 14 Jul 2017 20:16:05 GMT</pubDate>
            <atom:updated>2017-07-14T20:24:07.071Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9JTYIzhfMhbvdrmZgr0TQ.jpeg" /><figcaption>Visually Appealing But Ultimately Irrelevant Landscape</figcaption></figure><p>What if I want to save something in the repository without committing it? I’d have to add it to my repository’s gitignore. For a personal project, this is fine. However, on a large team, if everyone did that the gitignore can get bloated and irrelevant.</p><p>I needed a local gitignore so I can save files and directories in the shared repo without affecting others and this is how I did it.</p><p>In your terminal, cd to the repository where you want to make a local gitignore.</p><pre>cd ~/Documents/my_repo</pre><p>We want to edit the git config of the repository we’re in. The —-local flag specifies that we’re editing the config of just this repository and the —e flag tells git to edit the config. For more info on this, run git config to see all of the options.</p><pre>git config --local -e</pre><p>This should bring you into <a href="https://www.engadget.com/2012/07/10/vim-how-to/">vim</a> mode looking at your local git config. Just make sure to add the excludesfile line under the [core] section and save it.</p><pre>[core]</pre><pre>    ... (existing configurations)<br>    excludesfile = ~/Documents/my_repo/.local_gitignore</pre><pre>[remote &quot;origin&quot;]</pre><pre>    ... (existing configurations)</pre><pre>[branch &quot;master&quot;]</pre><pre>    ... (existing configurations)</pre><p>Great! Now you have a local gitignore! Git will read from this file to determine what to not to track. You can treat it just like your other gitignore. Any file or directory you put in here will get ignored. Including itself. So what I do is put .local_gitignore at the top of my .local_gitignore so it won’t get tracked either!</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b19f083492b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>