<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Jamie Krug&apos;s ColdFusion Blog - Git</title>
			<link>http://jamiekrug.com/blog/index.cfm</link>
			<description>Jamie Krug&apos;s ColdFusion blog, regarding ColdFusion/CFML and other programming adventures as well as some learning experiences. EDB: Event Driven Blogging (in the event that I actually have something worth sharing:)</description>
			<language>en-us</language>
			<pubDate>Wed, 08 Sep 2010 19:34:22 -0400</pubDate>
			<lastBuildDate>Thu, 27 May 2010 11:06:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>jamie@jamiekrug.com</managingEditor>
			<webMaster>jamie@jamiekrug.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>jamie@jamiekrug.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Jamie Krug&apos;s ColdFusion Blog</title>
				<link>http://jamiekrug.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Git Global Ignores, Can Be Overridden</title>
				<link>http://jamiekrug.com/blog/index.cfm/2010/5/27/git-global-ignores-can-be-overridden</link>
				<description>
				
				First off, I&apos;m loving &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; (fast/awesome/free/open-source distributed version control system). If you haven&apos;t already, check it out!

I&apos;d like to briefly mention how to ignore certain files from version control, both by project and globally. I&apos;d also like to confirm that it&apos;s very easy to add files to version control, which are normally globally ignored.

Git makes it simple to ignore certain files/directories/patterns from version control by creating a .gitignore file in your project root, and optionally in any sub-directory. Check out the &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/gitignore.html&quot;&gt;gitignore docs page&lt;/a&gt; for more.

That said, I quickly found myself ignoring the same patterns for every repository. Fortunately, Git also makes it easy to globally ignore patterns. You just set a global config property of core.excludesfile to tell Git where to look for a global gitignore file. The following two commands take care of setting the property and creating a file with a few popular ignore patterns.

&lt;code&gt;git config --global core.excludesfile ~/.gitignore
printf &quot;.project\n*.iml\n.idea/\nWEB-INF/\n&quot; &gt;&gt; ~/.gitignore&lt;/code&gt;

The above commands will work on both Linux and Mac. Windows users will likely want to locate a global .gitignore file in some common user settings directory. You can then create/edit the text file any way you&apos;d like.

For me, on &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu Linux&lt;/a&gt;, I end up with a /home/jkrug/.gitignore file that looks like this:

&lt;code&gt;.project
*.iml
.idea/
WEB-INF/&lt;/code&gt;

You can also manually edit your .gitignore file, of course, and add comments if you&apos;d like:

&lt;code&gt;# Eclipse project files
.project

# IntelliJ IDEA project files
*.iml
.idea/

# Java WAR directories
WEB-INF/&lt;/code&gt;

Now here&apos;s the bonus: if you have one repository in which you&apos;d like to add a file that is globally ignored to version control, you can do so. Simply use a standard add command with a -f flag, e.g.,

&lt;code&gt;git add -f WEB-INF/web.xml&lt;/code&gt;

The global ignores are especially useful to me when I &lt;a href=&quot;http://help.github.com/forking/&quot;&gt;fork a project&lt;/a&gt; that may not have an ignore for my primary IDE&apos;s (&lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA&lt;/a&gt;) configuration files. And when I have a custom project in which I&apos;d like to add one of those global ignores--no problem!

Happy versioned coding :)
				
				</description>
						
				
				<category>Git</category>				
				
				<category>Ubuntu</category>				
				
				<pubDate>Thu, 27 May 2010 11:06:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2010/5/27/git-global-ignores-can-be-overridden</guid>
				
			</item>
			
		 	
			</channel></rss>