<?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>Anlek Consulting &#187; Git</title>
	<atom:link href="http://anlek.com/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://anlek.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 10 Nov 2011 16:29:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Removing a remote git branch</title>
		<link>http://anlek.com/2009/05/removing-a-remote-git-branch/</link>
		<comments>http://anlek.com/2009/05/removing-a-remote-git-branch/#comments</comments>
		<pubDate>Wed, 06 May 2009 20:34:38 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=96</guid>
		<description><![CDATA[I was showing someone how great git is using the new version of MSYSgit (version 1.6.2.2.1669.g7eaf8) and found out that calling git push &#8211;all will push ALL branches, even if they don&#8217;t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily [...]]]></description>
			<content:encoded><![CDATA[<p>I was showing someone how great git is using the new version of MSYSgit (version 1.6.2.2.1669.g7eaf8) and found out that calling git push &#8211;all will push ALL branches, even if they don&#8217;t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily a quick google search pointed me to this great blog post: <a href="http://unpluggable.com/?p=129">.liferc</a>.<br />
Reading this, very to the point, post I was a little confused on what is my repository. So I figured I&#8217;d clearify a bit by what you need to do.<br />
Say you have a git branch that you pushed called &#8216;<em>new_feature_26</em>&#8216; and you needed to remove it from your remote server called <em>origin</em>, the command would be:</p>
<p><code>git push origin :heads/new_feature_26</code></p>
<p>I&#8217;m not exactly sure how this works by deleting the remote branch but I know it does!</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2009/05/removing-a-remote-git-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git branch and status info in prompt (on Windows)</title>
		<link>http://anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/</link>
		<comments>http://anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 07:21:56 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=47</guid>
		<description><![CDATA[I found this great article on Intridea Development Blog on how to put git status in your prompt window. It&#8217;s an amazingly useful addon as I often forget what branch I&#8217;m on in my project or if I changed anything. The problem is that it&#8217;s written for OSX/Linux users. So I&#8217;d like to show you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_53" class="wp-caption alignleft" style="width: 543px"><a href="http://blog.anlek.com/wp-content/uploads/2009/02/git_bash1.jpg"><img src="http://blog.anlek.com/wp-content/uploads/2009/02/git_bash1.jpg" alt="Git Bash with Git Branch and Status" title="Git Bash with Git Branch and Status" width="533" height="213" class="size-full wp-image-53" /></a><p class="wp-caption-text">Git Bash with Branch and Status Info</p></div>
<p>I found this great article on <a href="http://www.intridea.com/posts/git-status-in-your-prompt" target="_blank">Intridea Development Blog</a> on how to put git status in your prompt window. It&#8217;s an amazingly useful addon as I often forget what branch I&#8217;m on in my project or if I changed anything. The problem is that it&#8217;s written for OSX/Linux users. So I&#8217;d like to show you what you need to do to get this same functionality in Git Bash on Windows. (Git Bash using <a href="http://code.google.com/p/msysgit/" target="_blank">MSysGit</a>)</p>
<p>To make this addon work with Git Bash you need to create your BASH settings file. To do this go to your <a href="http://en.wikipedia.org/wiki/Home_directory">home directory</a> and create a file called &#8216;.bashrc&#8217;<br/><br />
<em>Because Windows Explorer will not let you create a file without a name (only an extension) we need to use Git Bash (or command prompt): Open Git Bash (by default it will be in the home directory) and type in &#8220;touch .bashrc&#8221;</em>
</p>
<p>
  Inside your .bashrc file type this: (copied from <a href="http://www.intridea.com/posts/git-status-in-your-prompt" target="_blank">Intridea Development Blog</a>):<br />
<code><br />
function parse_git_dirty {<br />
  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] &#038;&#038; echo "*"<br />
}<br />
function parse_git_branch {<br />
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* (.*)/[1$(parse_git_dirty)]/"<br />
} <br/><br />
export PS1='u:[ 33[0;32m]w[ 33[0;33m]$(parse_git_branch)[e[0m]: '<br />
</code></p>
<p>Now open a new Git Bash window and you should see your new prompt. Keep in mind it will not show up in folders that aren&#8217;t git repositories and it will slow down your prompt a bit because it has to check the status of your Git repository every time you hit ENTER.</p>
<p><strong>Update:</strong> It seems the new version of <a href="http://code.google.com/p/msysgit/">msysGit</a> comes with this feature built in</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

