<?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>botsko &#187; Git</title>
	<atom:link href="http://www.botsko.net/blog/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.botsko.net/blog</link>
	<description>continuing education</description>
	<lastBuildDate>Sat, 24 Jul 2010 21:42:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Git Status in Command Line</title>
		<link>http://www.botsko.net/blog/2010/03/16/git-status-in-command-line/</link>
		<comments>http://www.botsko.net/blog/2010/03/16/git-status-in-command-line/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 21:43:34 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=545</guid>
		<description><![CDATA[There are many tricks out there to get the git status to show in the command line path, but here&#8217;s one that worked the best for me on a Mac OS X Snow Leopard machine. Download the git tarball, and find the contrib/completion/git-completion.bash file. Move it to a good location on your system. In my [...]]]></description>
			<content:encoded><![CDATA[<p>There are many tricks out there to get the git status to show in the command line path, but here&#8217;s one that worked the best for me on a Mac OS X Snow Leopard machine.<br />
<span id="more-545"></span><br />
Download the git tarball, and find the contrib/completion/git-completion.bash file. Move it to a good location on your system. In my situation I went with:</p>
<p><code>/opt/local/etc/bash_completion.d/git-completion</code></p>
<p>Import that code into your .bash_profile and then add in the code necessary to append the branch name output:</p>
<p><code>. /opt/local/etc/bash_completion.d/git-completion<br />
PS1='\h:\W$(__git_ps1 "(%s)") \u\$ '</code></p>
<p>You&#8217;re done. If you&#8217;re getting the &#8220;command not found&#8221; error after restarting the terminal, be sure your completion file is in the right spot.</p>
<p>If you want to color things a bit, you could change it to one of the options below:</p>
<p><code>RED="\[\033[0;31m\]"<br />
GREEN="\[\033[0;32m\]"<br />
YELLOW="\[\033[0;33m\]"<br />
BLUE="\[\033[0;34m\]"<br />
PURPLE="\[\033[0;35m\]"<br />
TEAL="\[\033[0;36m\]"<br />
GRAY="\[\033[0;37m\]"<br />
WHITE="\[\033[0;38m\]"<br />
PS1="$TEAL\h: $GRAY\W$GREEN \$(__git_ps1 '(%s)')$WHITE \$ "<br />
</code></p>
<p>A ton of different ways can be found here:<br />
<a href="http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt">http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2010/03/16/git-status-in-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Git on Mac OS X Snow Leapord</title>
		<link>http://www.botsko.net/blog/2010/02/18/installing-git-on-mac-os-x-snow-leapord/</link>
		<comments>http://www.botsko.net/blog/2010/02/18/installing-git-on-mac-os-x-snow-leapord/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 16:37:21 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=520</guid>
		<description><![CDATA[Git is an amazing source control system, and is even better when used with GitHub.com. Installing git on Mac is pretty simple. First, download the latest version from git-scm.com. Extract the contents of the archive and open terminal to the new folder. Note: Since this requires compiling, you must have the developer tools installed. Download [...]]]></description>
			<content:encoded><![CDATA[<p>Git is an amazing source control system, and is even better when used with <a href="http://www.github.com">GitHub.com</a>. Installing git on Mac is pretty simple.<br />
<span id="more-520"></span><br />
First, download the latest version from <a href="http://www.git-scm.com">git-scm.com</a>. Extract the contents of the archive and open terminal to the new folder.</p>
<p>Note: Since this requires compiling, you must have the developer tools installed. Download and install the <a href="http://developer.apple.com/tools/xcode/">Xcode</a> package from Apple.</p>
<p><code>$ ./configure --prefix=/opt/git<br />
$ make<br />
$ sudo make install</code></p>
<p>Now that it&#8217;s installed, you need to make sure it&#8217;s in your path. Add the following content your bash profile:</p>
<p><code>$ vi ~/.bash_profile</code><br />
<code>export PATH=${PATH}:/opt/git/bin</code></p>
<p>Restart terminal and you should see the manual for git when you run the <code>git</code> command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2010/02/18/installing-git-on-mac-os-x-snow-leapord/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version Numbers Using git tag, git describe</title>
		<link>http://www.botsko.net/blog/2009/12/30/version-numbers-using-git-tag-git-describe/</link>
		<comments>http://www.botsko.net/blog/2009/12/30/version-numbers-using-git-tag-git-describe/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 00:39:42 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=395</guid>
		<description><![CDATA[I&#8217;ve spent the past year doing all of my development using the Git version control system. It&#8217;s far better than than subversion and has made my job as project manager/developer/commit manager much easier. However, since it does not use revision numbers like subversion it&#8217;s more difficult to include as build numbers or version numbers. I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the past year doing all of my development using the Git version control system. It&#8217;s far better than than subversion and has made my job as project manager/developer/commit manager much easier.</p>
<p>However, since it does not use revision numbers like subversion it&#8217;s more difficult to include as build numbers or version numbers. I wanted some automated way to identify the build in some way other than a non-incremental SHA1-hash. The only solution I&#8217;ve been able to find (without using any external software) is as follows.</p>
<p>The workflow to make this process work as expected would involve the following:</p>
<ul>
<li>Prepare master for a new release. Create a new branch for the release and tag it with 1.0.</li>
<li>Make a single commit on master (necessary to separate the history) and re-tag with something for the next revision, like 1.1-alpha.</li>
<li>Tags on branch continue with 1.0-1, 1.0-2, etc. Tags on master continue with 1.1-alpha-1, 1.1-alpha-2, etc.</li>
</ul>
<p>What&#8217;s problematic with this is the requirement to both tag and branch each time you want a release. You also need to add in a extra commit before re-tagging master so there&#8217;s an unwanted extra step.<br />
<span id="more-395"></span><br />
Create a new repo for a test file:<br />
<code><br />
$ echo "testing" &gt; myfile<br />
$ git init<br />
$ git add .<br />
$ git commit -m "testing"<br />
</code></p>
<p>No tags yet. Create branch for 1.0<br />
<code><br />
$ git checkout -b 1.0<br />
$ git tag -a 1.0 -m "Tagging for 1.0"<br />
$ echo "changing my text" &gt; myfile<br />
$ git commit -a -m "updated"<br />
$ git describe<br />
</code></p>
<p>At this point, you&#8217;ll see something like: 1.0-1-ga3548ab. And if you run describe on the master branch, it still will report as &#8217;1.0&#8242;.</p>
<p>Now, you need to create a single commit on master to &#8220;begin&#8221; the flow towards the next release. I&#8217;d recommend manually updating some code or text in your files for the new major version, since you obviously want this to be a minor commit.<br />
<code><br />
$ echo "changing my text for next release" &gt; myfile<br />
$ git commit -a -m "updated"<br />
</code><br />
<code>$ git tag -a 1.1-alpha -m "Beginning work on next release"</code></p>
<p>When you run describe on the master branch it will now report properly as &#8220;1.1-alpha&#8221;. Yet as you continue bugfixes on the 1.0 branch, it will stay as &#8220;1.0-2-g1f37eb1&#8243;, etc.</p>
<p>If you have more information or a better way (with or without external software) then please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/12/30/version-numbers-using-git-tag-git-describe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Remote Git Repository</title>
		<link>http://www.botsko.net/blog/2009/08/13/creating-remote-git-repository/</link>
		<comments>http://www.botsko.net/blog/2009/08/13/creating-remote-git-repository/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 21:54:10 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Tech-Tidbit]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=412</guid>
		<description><![CDATA[Here is a quick and dirty guide to create your own remote repository. Access is controlled through standard ssh so it&#8217;s as secure as your ssh access is. $ mkdir /git/repos/myapp.git $ cd /git/repos/myapp.git $ git --bare init $ exit On your local machine, find the local git repository that you want to push to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick and dirty guide to create your own remote repository. Access is controlled through standard ssh so it&#8217;s as secure as your ssh access is.<br />
<span id="more-412"></span><br />
<code>$ mkdir /git/repos/myapp.git<br />
$ cd /git/repos/myapp.git<br />
$ git --bare init<br />
$ exit</code></p>
<p>On your local machine, find the local git repository that you want to push to the remote location.</p>
<p><code>$ git remote add origin ssh://yourdomain.com/git/repos/myapp.git<br />
$ git push origin master</code></p>
<p>Now your local repo will be tracking the remote repository and you may continue pushing/pulling it from anywhere. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/08/13/creating-remote-git-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Git on Cent OS 5</title>
		<link>http://www.botsko.net/blog/2009/08/13/installing-git-on-cent-os-5-mediatemple-dv3-0/</link>
		<comments>http://www.botsko.net/blog/2009/08/13/installing-git-on-cent-os-5-mediatemple-dv3-0/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 21:50:30 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Tech-Tidbit]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=415</guid>
		<description><![CDATA[It&#8217;s pretty straightforward to install Git on a mediatemple DV 3.0 server. If you have later versions of their servers with Yum installed, you may be able to simply install it through yum. To begin you need to download the latest version and run through the standard extraction and configure/make/make install. $ wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz $ [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty straightforward to install Git on a mediatemple DV 3.0 server. If you have later versions of their servers with Yum installed, you may be able to simply install it through yum.</p>
<p>To begin you need to download the latest version and run through the standard extraction and configure/make/make install.</p>
<p><span id="more-415"></span></p>
<p><code>$ wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz<br />
$ tar -zxvf *.gz<br />
$ cd git*<br />
$ ./configure --prefix=/usr/local<br />
$ make<br />
$ make install</code></p>
<p>Try entering <code>git</code> into the command line to ensure that everything installed properly.</p>
<p>Turn on command line coloring, very helpful:<br />
<code><br />
$ git config --global color.branch "auto"<br />
$ git config --global color.status "auto"<br />
$ git config --global color.diff "auto"<br />
</code></p>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/08/13/installing-git-on-cent-os-5-mediatemple-dv3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
