<?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>Rusty Razor Blade &#187; git</title>
	<atom:link href="http://www.rustyrazorblade.com/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rustyrazorblade.com</link>
	<description>Tech Thoughts, Mostly on LAMP - by Jon Haddad</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Git Tip: Setting Up Your Remote Server</title>
		<link>http://www.rustyrazorblade.com/2011/04/git-tip/</link>
		<comments>http://www.rustyrazorblade.com/2011/04/git-tip/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 19:25:11 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=1420</guid>
		<description><![CDATA[<p><a href="http://www.rustyrazorblade.com/wp-content/uploads/2011/04/Screen-shot-2011-04-23-at-12.23.42-PM.png"></a>Here&#8217;s a pretty common git error message if you&#8217;ve added a remote origin server manually.</p> <p>You asked me to pull without telling me which branch you<br /> want to merge with, and &#8216;branch.master.merge&#8217; in<br /> your configuration file does not tell me, either. Please<br /> specify which branch you want to use on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rustyrazorblade.com/wp-content/uploads/2011/04/Screen-shot-2011-04-23-at-12.23.42-PM.png"><img src="http://www.rustyrazorblade.com/wp-content/uploads/2011/04/Screen-shot-2011-04-23-at-12.23.42-PM.png" alt="" title="Screen shot 2011-04-23 at 12.23.42 PM" width="76" height="31" class="alignright size-full wp-image-1422" /></a>Here&#8217;s a pretty common git error message if you&#8217;ve added a remote origin server manually.</p>
<blockquote><p>You asked me to pull without telling me which branch you<br />
want to merge with, and &#8216;branch.master.merge&#8217; in<br />
your configuration file does not tell me, either. Please<br />
specify which branch you want to use on the command line and<br />
try again (e.g. &#8216;git pull <repository> <refspec>&#8216;).<br />
See git-pull(1) for details.</p></blockquote>
<p>Well, fortunately it&#8217;s pretty easy to fix.  Edit your .git/config, adding the remote and merge lines under your master branch.<br />
<code>[branch "master"]<br />
   remote = origin<br />
   merge = refs/heads/master<br />
</code></p>
<p>Next time you&#8217;re on the master branch and pull, it&#8217;ll fetch the latest code off the master branch on the origin and merge into your local master.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2011/04/git-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git &#8211; What Changed Between Pushes?</title>
		<link>http://www.rustyrazorblade.com/2010/08/git-what-changed-between-pushes/</link>
		<comments>http://www.rustyrazorblade.com/2010/08/git-what-changed-between-pushes/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 21:53:07 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=1153</guid>
		<description><![CDATA[<p>There&#8217;s an overwhelming amount of git tools, and if you&#8217;re coming from SVN you might expect that the tools w/ the same names work the same way. You&#8217;d be wrong.</p> <p>Because of Git&#8217;s distributed nature, you can (and frequently do) have commits in your repo that you might not have pushed up. You might also [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s an overwhelming amount of git tools, and if you&#8217;re coming from SVN you might expect that the tools w/ the same names work the same way.  You&#8217;d be wrong.</p>
<p>Because of Git&#8217;s distributed nature, you can (and frequently do) have commits in your repo that you might not have pushed up.  You might also have forgotten what they were.  Good thing there&#8217;s a tool to check that.</p>
<p>Lets assume you&#8217;re on your master branch, and you&#8217;re comparing against the origin remote repo.  </p>
<pre>git whatchanged -p origin/master..HEAD</pre>
<p>That&#8217;ll give you a nice text diff of everything you&#8217;re about to push.  Awesome, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2010/08/git-what-changed-between-pushes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove File From Git History</title>
		<link>http://www.rustyrazorblade.com/2010/04/remove-file-from-git-history/</link>
		<comments>http://www.rustyrazorblade.com/2010/04/remove-file-from-git-history/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:55:43 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=1084</guid>
		<description><![CDATA[<p>Useful stuff. </p> git filter-branch -f --index-filter 'git update-index --remove filename' HEAD git push --force --verbose --dry-run git push --force <p>Slight better version. Only rewrites history from the first commit the file existed.</p> git filter-branch -f --index-filter 'git update-index --remove filename' ..HEAD git push --force --verbose --dry-run git push --force <p>Found on <a href="http://github.com/guides/completely-remove-a-file-from-all-revisions">github.</a></p>]]></description>
			<content:encoded><![CDATA[<p>Useful stuff.  </p>
<pre>
git filter-branch -f --index-filter 'git update-index --remove filename' HEAD
git push --force --verbose --dry-run
git push --force
</pre>
<p>Slight better version.  Only rewrites history from the first commit the file existed.</p>
<pre>git filter-branch -f --index-filter 'git update-index --remove filename' <introduction-revision-sha1>..HEAD
git push --force --verbose --dry-run
git push --force</pre>
<p>Found on <a href="http://github.com/guides/completely-remove-a-file-from-all-revisions">github.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2010/04/remove-file-from-git-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a remote git repository</title>
		<link>http://www.rustyrazorblade.com/2009/11/setting-up-a-remote-git-repository/</link>
		<comments>http://www.rustyrazorblade.com/2009/11/setting-up-a-remote-git-repository/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:49:10 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=921</guid>
		<description><![CDATA[<p>Here&#8217;s a <a href="http://toolmantim.com/articles/setting_up_a_new_remote_git_repository"> great guide</a> for setting up a new remote git repo. Thank you, Tool Man Tim.</p>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://toolmantim.com/articles/setting_up_a_new_remote_git_repository"> great guide</a> for setting up a new remote git repo.  Thank you, Tool Man Tim.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2009/11/setting-up-a-remote-git-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching from SVN to git</title>
		<link>http://www.rustyrazorblade.com/2008/11/switching-svn-to-git/</link>
		<comments>http://www.rustyrazorblade.com/2008/11/switching-svn-to-git/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 23:54:50 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=370</guid>
		<description><![CDATA[<p>I&#8217;ve been using SVN for several years now, so I&#8217;ve been partial to it, and reluctant to switch to another form of source control. I&#8217;m very comfortable with it, and I&#8217;ve got dozens of scripts to augment it and help me deal with it&#8217;s shortcomings, as well as <a href="http://www.rustyrazorblade.com/category/svn/">a few blog posts</a>.</p> Easier to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using SVN for several years now, so I&#8217;ve been partial to it, and reluctant to switch to another form of source control.  I&#8217;m very comfortable with it, and I&#8217;ve got dozens of scripts to augment it and help me deal with it&#8217;s shortcomings, as well as <a href="http://www.rustyrazorblade.com/category/svn/">a few blog posts</a>.</p>
<ul>
<li><strong>Easier to create a repository from existing code.</strong></li>
<p>This is the first thing I noticed about git that absolutely crushes subversion.  With subversion, you have a repository that you check files out of.  With git, you can literally create the repo while you&#8217;re in a directory.  </p>
<blockquote><p>git init</p></blockquote>
<p>The above line creates a new repository for you in your current directory.  Everything in there is now under version control.  It&#8217;s awesome.  So simple and elegant.</p>
<li><strong><a href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html">Git stash</a> is really, really cool.</strong></li>
<p>It&#8217;s nice to see that other people encounter the same problems I do when using SVN.  I&#8217;d be working on something, need to switch to a different branch, but I don&#8217;t want to commit my work.  It&#8217;s not done, and I didn&#8217;t create a branch to start.  Yes, I should have, but I thought it would be less than an hours work, and SVN&#8217;s merging kind of blows.  So I didn&#8217;t.</p>
<blockquote><p>Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit.</p></blockquote>
<p>Yes, there are ways around this in SVN, but it&#8217;s still a pain to merge in changes when I&#8217;m done.  Merging in your temporary stash is simple:</p>
<blockquote><p>git stash apply</p></blockquote>
<p>On my first day using git, I had already used this feature.  Very handy.</p>
<li><strong>I finally understand why I&#8217;d want the entire log on my machine.</strong></li>
<p>I&#8217;ve always worked out of an office where my repo was on a gigabit line and was sitting nearby.  I also was usually SSH&#8217;ed into the machine so I could just do the commands remotely and see the output.  However, I&#8217;m doing some work over a VPN, and using SVN is incredibly slow and annoying.  It&#8217;s also over http only, so I&#8217;ve lost my sweet file:///.  Git absolutely crushes SVN here.</p>
<li><strong>The git client supports SVN. </strong></li>
<p>It&#8217;s nice that I don&#8217;t need to migrate everything over right away.  I like making commits that aren&#8217;t shared with everyone right away, since I might do a lot of work that I consider valuable, but doesn&#8217;t end up compiling or working at all.  I realize I could branch here, but I&#8217;m not always on top of things.  This ties into the stash mentioned above.  </p>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2008/11/switching-svn-to-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

