<?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>dan.thoughts &#187; Git</title>
	<atom:link href="http://blog.sosedoff.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sosedoff.com</link>
	<description>Web-development, PHP, Ruby, Sinatra, Merb, Rails, MySQL, SQLite, Web Services.</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:54:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Delete last Git commit</title>
		<link>http://blog.sosedoff.com/2011/01/26/delete-last-git-commit/</link>
		<comments>http://blog.sosedoff.com/2011/01/26/delete-last-git-commit/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 05:54:49 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=349</guid>
		<description><![CDATA[One in a while everybody makes a wrong commit. If you didnt push this commit yet you can use the following command to revert changes:

git reset --hard HEAD~1

HEAD~1 is just an alias for the commit before head. Alternatively, you can refer to the SHA-1 of the hash you want to reset to. Note that when [...]]]></description>
			<content:encoded><![CDATA[<p>One in a while everybody makes a wrong commit. If you didnt push this commit yet you can use the following command to revert changes:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git reset <span style="color: #660033;">--hard</span> HEAD~<span style="color: #000000;">1</span></pre></div></div>

<p>HEAD~1 is just an alias for the commit before head. Alternatively, you can refer to the SHA-1 of the hash you want to reset to. Note that when using &#8220;&#8211;hard&#8221; any changes since the commit before head are lost. To keep changes you can use softmode &#8220;&#8211;soft&#8221; that will delete the commit but it will leave all your changed files.</p>
<p>In case if the commit was already pushed you can use revert command, which will create a new commit that reverses everything introduced by the accidental commit.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git revert HEAD</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2011/01/26/delete-last-git-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snippet: Cleanup your Git repository</title>
		<link>http://blog.sosedoff.com/2010/06/15/snippet-cleanup-your-git-repository/</link>
		<comments>http://blog.sosedoff.com/2010/06/15/snippet-cleanup-your-git-repository/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 06:35:56 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=240</guid>
		<description><![CDATA[Snippet (found on net) for removing files from repository that are no longer present under your project.

$ git rm $&#40;git ls-files -d&#41;

For best use add it to bash alias file: ~/.bashrc or ~/.bash-aliases (under ubuntu):

alias gitclean='git rm $(git ls-files -d)'

]]></description>
			<content:encoded><![CDATA[<p>Snippet (found on net) for removing files from repository that are no longer present under your project.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ git <span style="color: #c20cb9; font-weight: bold;">rm</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>git ls-files -d<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>For best use add it to bash alias file: ~/.bashrc or ~/.bash-aliases (under ubuntu):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gitclean</span>=<span style="color: #ff0000;">'git rm $(git ls-files -d)'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2010/06/15/snippet-cleanup-your-git-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Git on CentOS 5.2</title>
		<link>http://blog.sosedoff.com/2009/06/28/install-git-on-centos-52/</link>
		<comments>http://blog.sosedoff.com/2009/06/28/install-git-on-centos-52/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 03:28:19 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=151</guid>
		<description><![CDATA[First, we need to install all dependencies:

# yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel

Next, get the git 1.6.x sources:

# wget http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz

Then, unpack and cd into git sources folder and install it:

# make &#38;&#38; make install &#38; make clean

That`s it, now you`ll have git system ready to go.
]]></description>
			<content:encoded><![CDATA[<p>First, we need to install all dependencies:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel</span></pre></div></div>

<p>Next, get the git 1.6.x sources:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># wget http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz</span></pre></div></div>

<p>Then, unpack and cd into git sources folder and install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># make &amp;&amp; make install &amp; make clean</span></pre></div></div>

<p>That`s it, now you`ll have git system ready to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2009/06/28/install-git-on-centos-52/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

