<?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>Racker Hacker &#187; bash</title>
	<atom:link href="http://rackerhacker.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Wed, 16 May 2012 12:55:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Compare commits between two git branches</title>
		<link>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/</link>
		<comments>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 15:00:24 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3104</guid>
		<description><![CDATA[I found myself stuck in a particularly nasty situation a few weeks ago where I had two git branches with some commits that were mixed up. Some commits destined for a branch called development ended up in master. To make matters worse, development was rebased on top of master and the history was obviously mangled. [...]<p><a href="http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/">Compare commits between two git branches</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I found myself stuck in a particularly nasty situation a few weeks ago where I had two git branches with some commits that were mixed up.  Some commits destined for a branch called development ended up in master.  To make matters worse, development was rebased on top of master and the history was obviously mangled.</p>
<p>My goal was to find out which commits existed in development but didn't exist anywhere in master.  From there, I needed to find out which commits existed in master that didn't exist in development.  That would give me all of the commits that needed to be in the development branch.</p>
<p>I constructed this awful looking bash mess to figure out which commits were in development but not in master:<br />
<script src="https://gist.github.com/2034011.js?file=commitdiff.sh"></script></p>
<p>I had a list of commits that existed in development but not in master:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">965cf71 Trollface
acda854 Some patch 2
bf1f3e2 Some patch 1
db1980c Packaging</pre></div></div>

<p>From there, I could swap <code>MASTER</code> and <code>DEV</code> to figure out which commits existed in master but not in development.  Only a couple of commits showed up and these were the ones which were committed and pushed to master inadvertently.  After a couple of careful cherry picks and reversions, my branches were back to normal.</p>
<p><a href="http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/">Compare commits between two git branches</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Limiting which commands are kept in the bash history file</title>
		<link>http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/</link>
		<comments>http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 18:33:55 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/</guid>
		<description><![CDATA[By setting a certain bash environment variable, you can limit which commands are kept in the .bash_history file. The following options can be passed to the HISTCONTROL environmental variable: ignorespace - omits commands beginning with a space ignoredups - omits commands that match the previously run command ignoreboth - combines ignorespace and ignoredups erasedups - [...]<p><a href="http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/">Limiting which commands are kept in the bash history file</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>By setting a certain bash environment variable, you can limit which commands are kept in the .bash_history file.  The following options can be passed to the HISTCONTROL environmental variable:</p>
<p><strong>ignorespace</strong> - omits commands beginning with a space<br />
<strong>ignoredups</strong> - omits commands that match the previously run command<br />
<strong>ignoreboth</strong> - combines <strong>ignorespace</strong> and <strong>ignoredups</strong><br />
<strong>erasedups</strong> - removes previous lines that match the line that was just run</p>
<p>To set it, simply run the following from the command line, or add it to the .bashrc or a single user's .bash_profile:</p>
<p><code>export HISTCONTROL=ignorespace</code></p>
<p>If no value is set, then all commands will be saved regardless of their content.</p>
<p><a href="http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/">Limiting which commands are kept in the bash history file</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/01/29/limiting-which-commands-are-kept-in-the-bash-history-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

