<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Jason Meridth</title><link>http://www.lostechies.com/blogs/jason_meridth/default.aspx</link><description>LosTechies Blogger - Agile software developer</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><itunes:subtitle>Blog of Jason Meridth</itunes:subtitle><itunes:summary>Trot the Frickin' Ale</itunes:summary><itunes:owner><itunes:name>Jason Meridth</itunes:name><itunes:email>jmeridth@gmail.com</itunes:email></itunes:owner><itunes:category text="Technology"><itunes:category text="Software How-To" /></itunes:category><itunes:explicit>no</itunes:explicit><itunes:keywords>jason meridth, lostechies, .net, ruby, linux</itunes:keywords><itunes:image href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/Pablo_5F00_thumb.png" /><language>en</language><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jasonmeridth" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>“Bad Interpreter: No Medium” error when running Ruby from Git Bash</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/5a_yRG2YU6A/bad-interpreter-no-medium-error-when-running-ruby-from-git-bash.aspx</link><pubDate>Tue, 06 Oct 2009 14:50:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:25954</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;I opened my Windows VM last night for the first time in months to finally work on a .NET project from Github.&amp;nbsp; When I found out I needed the rspec gem installed (I'm normally a shoulda guy), I decided to see what gems I had installed first:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;gem list&lt;/pre&gt;
&lt;p&gt;and got the following error:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;$ gem list&lt;br /&gt;sh.exe": /c/Ruby/bin/gem: D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe: bad interpreter: no medium&lt;/pre&gt;
&lt;p&gt;Umm..... D:/Users/Luis? After some googling I found &lt;a target="_blank" href="http://stackoverflow.com/questions/835865/bad-interpreter-no-medium-error-when-running-ruby-from-git-bash"&gt;this article on StackOverflow&lt;/a&gt; that directed me to this &lt;a target="_self" href="http://www.liquidfish.net/2009/04/ruby-and-git-bash-woes.htm"&gt;blog&lt;/a&gt;.&amp;nbsp; It pretty much states that the shebang line (#!) at the top of my Ruby One-Click installer file had changed/been corrupted, I don't know.&amp;nbsp; I changed the line to point to my ruby exe (#!C:\Ruby\bin\ruby.exe) and my gem commands started working again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=%e2%80%9cBad+Interpreter%3a+No+Medium%e2%80%9d+error+when+running+Ruby+from+Git+Bash&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f10%2f06%2fbad-interpreter-no-medium-error-when-running-ruby-from-git-bash.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f10%2f06%2fbad-interpreter-no-medium-error-when-running-ruby-from-git-bash.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=25954" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=5a_yRG2YU6A:10LYQIrK2OA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=5a_yRG2YU6A:10LYQIrK2OA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=5a_yRG2YU6A:10LYQIrK2OA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=5a_yRG2YU6A:10LYQIrK2OA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=5a_yRG2YU6A:10LYQIrK2OA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/windows/default.aspx">windows</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/bash/default.aspx">bash</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/gems/default.aspx">gems</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/10/06/bad-interpreter-no-medium-error-when-running-ruby-from-git-bash.aspx</feedburner:origLink></item><item><title>Moving servers</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/FfkRa6K6LeU/moving-servers.aspx</link><pubDate>Sat, 03 Oct 2009 03:32:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:25798</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>1</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/10/02/moving-servers.aspx#comments</comments><description>&lt;p&gt;To our readers,&lt;/p&gt;
&lt;p&gt;We wanted to give you all a heads-up that we will be moving servers tomorrow evening, October 3rd, 2009.&amp;nbsp; We plan to turn off all comments at 8 PM CST.&amp;nbsp; The migration will begin at 9 PM CST.&amp;nbsp; We do not have an estimate on the time that the move will take.&amp;nbsp; We ask for your patience and look forward to being back to normal standing some time Sunday, October 4, 2009.&lt;/p&gt;
&lt;p&gt;Again, we thank you for your patience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Moving+servers&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f10%2f02%2fmoving-servers.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f10%2f02%2fmoving-servers.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=25798" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=FfkRa6K6LeU:W5VhbsW8Ts4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=FfkRa6K6LeU:W5VhbsW8Ts4:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=FfkRa6K6LeU:W5VhbsW8Ts4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=FfkRa6K6LeU:W5VhbsW8Ts4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=FfkRa6K6LeU:W5VhbsW8Ts4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=FfkRa6K6LeU:W5VhbsW8Ts4:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=FfkRa6K6LeU:W5VhbsW8Ts4:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/10/02/moving-servers.aspx</feedburner:origLink></item><item><title>git instaweb</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/tHRh0CyPrtI/git-instaweb.aspx</link><pubDate>Sun, 27 Sep 2009 00:53:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:25568</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>4</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/26/git-instaweb.aspx#comments</comments><description>&lt;p&gt;I was reading &lt;a href="http://progit.org/book/ch4-6.html" target="_blank"&gt;"Pro Git" by Scott Chacon&lt;/a&gt; and was on the section about "git instaweb".  This is where you can run gitweb, a cgi script that comes with git, locally or on a server.  I have successfully gotten gitweb up for my personal git repos on my remote server.  I use it all the time.  I was curious if I could get it working locally, for friends who prefer a visual tool to see their git logs, commits, etc.
I cd into a local repo (you have to cd into the .git folder of the app to get the desired view):
&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;cd /code/app/.git
&lt;/pre&gt;
&lt;p&gt;
and run the instaweb command (note: I'm on a macbook pro that already has ruby installed, hence my choice of using webrick instead of the default lighttpd):
&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;git instaweb -d webrick --start
&lt;/pre&gt;
&lt;p&gt;
I tried the command without the "--start" command and it kept trying to seek a browser.  I tried "-b firefox", "-b Firefox", "-b /Application/Firefox.app/MacOS/firefox-bin", etc and they all failed.  I found the "--start" suggestion on &lt;a href="http://stackoverflow.com/questions/1258353/running-git-instaweb-on-boot" target="_blank"&gt;StackOverflow.com&lt;/a&gt;
Once I ran this command, I could see the git log, commits, diffs, etc in gitweb for my local changes.  What this will do is run the daemon on port 1234 of localhost.  If you open your browser of choice and go to &lt;a href="http://localhost:1234"&gt;http://localhost:1234&lt;/a&gt; then you will see gitweb for the git repository you ran the command in.
The catch:  you will have to stop the process manually.  On my macbook, I ran the following command:
&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;kill -9 `ps -aux | grep webrick | grep -v grep | awk '{print $2}'`
&lt;/pre&gt;
&lt;p&gt;
This will pass the id of the local process running webrick to "kill -9" and kill the process. ("grep -v grep" excludes the grep command you just ran from the processes returned in the ps query)
Note:  I personally use "git log --graph", gitk, gitx, or other tools for this, usually.  Just thought it was a good addition to my git toolset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=git+instaweb&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f26%2fgit-instaweb.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f26%2fgit-instaweb.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=25568" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=tHRh0CyPrtI:1DrhPlpNkBg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=tHRh0CyPrtI:1DrhPlpNkBg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=tHRh0CyPrtI:1DrhPlpNkBg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=tHRh0CyPrtI:1DrhPlpNkBg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=tHRh0CyPrtI:1DrhPlpNkBg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=tHRh0CyPrtI:1DrhPlpNkBg:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=tHRh0CyPrtI:1DrhPlpNkBg:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/26/git-instaweb.aspx</feedburner:origLink></item><item><title>Using gsub to wrap substring</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/OTq_9PJvXk4/using-gsub-to-wrap-substring.aspx</link><pubDate>Thu, 10 Sep 2009 19:56:47 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:24706</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>1</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/10/using-gsub-to-wrap-substring.aspx#comments</comments><description>&lt;p&gt;Over my lunch today I finally had an opportunity to use something I learned yesterday reading Dan Croak's &lt;a href="http://robots.thoughtbot.com/post/183070874/gsub-with-a-block" target="_blank"&gt;"gsub with a block"&lt;/a&gt; post on &lt;a href="http://robots.thoughtbot.com" target="_blank"&gt;the Thoughtbot blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I use the twitter gem and just display my last status on my personal homepage at &lt;a href="http://jasonmeridth.com" target="_blank"&gt;JasonMeridth.com&lt;/a&gt;.  I didn't want to hand out my username and password so all I do is encapsulate the twitter piece in a module called TwitterHelper and put it into my app/helpers/ folder in my Rails application:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;
require 'twitter'
require 'pp'

module TwitterHelper  
  def latest_twitter_status(user_id='armmer')
    begin
      status = Twitter.user(user_id).status['text']
      status ||= ''
      status = status.gsub(/http:\/\/(.+?)\s/) do |url|
        " &amp;lt;a href='#{url}' target='_blank'&amp;gt;#{url}&amp;lt;/a&amp;gt; "
      end
    rescue Exception =&gt; e
      logger.info("Twitter Helper Exception: " + e)
      status = ""
    end
  end
end
&lt;/pre&gt;
&lt;p&gt;and then in my view I just call:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;
latest_twitter_status
&lt;/pre&gt;
&lt;p&gt;The important part of code to look at is:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;
status = status.gsub(/(http:\/\/.*)/) do |url|
  " &amp;lt;a href='#{url}' target='_blank'&amp;gt;#{url}&amp;lt;/a&amp;gt; "
end
&lt;/pre&gt;
This code will wrap any strings that start with http:// with an html href.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Using+gsub+to+wrap+substring&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fusing-gsub-to-wrap-substring.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fusing-gsub-to-wrap-substring.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=24706" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=OTq_9PJvXk4:WcXHoD1exN8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=OTq_9PJvXk4:WcXHoD1exN8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=OTq_9PJvXk4:WcXHoD1exN8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=OTq_9PJvXk4:WcXHoD1exN8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=OTq_9PJvXk4:WcXHoD1exN8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=OTq_9PJvXk4:WcXHoD1exN8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=OTq_9PJvXk4:WcXHoD1exN8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/10/using-gsub-to-wrap-substring.aspx</feedburner:origLink></item><item><title>"git commit -a" and "git add"</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/0GuEI6-Arwc/quot-git-commit-a-quot-and-quot-git-add-quot.aspx</link><pubDate>Thu, 10 Sep 2009 17:07:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:24704</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I've heard or read too many git blog posts/pod casts state that if you create a new file in your local Git repo and you want to shorten the steps on getting it added to the local repository, all you have to do is:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;git commit -am "my commit message"&lt;/pre&gt;
&lt;p&gt;This is _not_ true.  If the file has never been added to the repo prior, then you still have to:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;git add &amp;lt;file_name&amp;gt;&lt;/pre&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;The "git commit -a" command is a shortcut to a two-step process.  After you modify a file that is already known by the repo, you still have to tell the repo, "Hey!  I want to add this to the staged files and eventually commit it to you."  That is done by issuing the "git add" command.  "git commit -a" is staging the file and committing it in one step.&lt;/p&gt;
&lt;p&gt;If you create a new file, edit it, and issue the "git commit -a" command, you will see something like:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;~ &amp;gt; mkdir test
~ &amp;gt; cd test
~/test &amp;gt; git initInitialized empty Git repository in /Users/jasonmeridth/test/.git/
~/test(master) &amp;gt; touch test
~/test(master) &amp;gt; git commit -am "initial commit"
# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add &amp;lt;file&amp;gt;..." to include in what will be committed)
#
#       test
nothing added to commit but untracked files present (use "git add" to track)	
&lt;/pre&gt;
&lt;p&gt;
The "nothing added to commit but untracked files present" is the key comment.  Git even suggests using "git add" to track the file.  See, it's user friendly.
Just be aware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=%26quot%3bgit+commit+-a%26quot%3b+and+%26quot%3bgit+add%26quot%3b&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fquot-git-commit-a-quot-and-quot-git-add-quot.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fquot-git-commit-a-quot-and-quot-git-add-quot.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=24704" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0GuEI6-Arwc:Bd2t-BS14RQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0GuEI6-Arwc:Bd2t-BS14RQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0GuEI6-Arwc:Bd2t-BS14RQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=0GuEI6-Arwc:Bd2t-BS14RQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0GuEI6-Arwc:Bd2t-BS14RQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0GuEI6-Arwc:Bd2t-BS14RQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=0GuEI6-Arwc:Bd2t-BS14RQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/10/quot-git-commit-a-quot-and-quot-git-add-quot.aspx</feedburner:origLink></item><item><title>Git local pre-commit hook</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/yZ2FWlPodNU/git-local-pre-commit-hook.aspx</link><pubDate>Thu, 10 Sep 2009 16:47:21 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:24703</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/10/git-local-pre-commit-hook.aspx#comments</comments><description>&lt;p&gt;I've personally added a pre-commit hook to my local git repos.  It's like a personal CI before I push back to origin/master.  I run my tests locally anyway before committing and pushing, so I thought I would automate it.&lt;/p&gt;
&lt;p&gt;I open the .git/hooks/pre-commit file in my local repo (i.e, full path is something like /Users/jasonmeridth/code/rails/myapp/.git/hooks/pre-commit) and put the following:&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;
#!/bin/sh
rake db:migrate
rake db:test:prepare
rake
&lt;/pre&gt;
&lt;p&gt;For non-rails developers, this will run any database migrations on my &lt;app_name&gt;_development database, then ensure the &lt;app_name&gt;_test database has the same schema, and then runs the tests.&lt;/p&gt;
&lt;p&gt;Git hooks are not made executable by default, except on Windows because it doesn't understand the unix permissions.  On my Mac, I have to issue the following command (from the app root):&lt;/p&gt;
&lt;pre name="code" class="bash"&gt;
chmod +x .git/hooks/pre-commit
&lt;/pre&gt;
&lt;p&gt;This makes the pre-commit hook executable and Git will run it before every commit to this repo. If this process returns a non-zero value (failure), then the commit does _not_ happen.  I'll be shown the failing tests and I can fix them and try to re-commit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Git+local+pre-commit+hook&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fgit-local-pre-commit-hook.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f09%2f10%2fgit-local-pre-commit-hook.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=24703" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=yZ2FWlPodNU:KNLHH_bGOs0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=yZ2FWlPodNU:KNLHH_bGOs0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=yZ2FWlPodNU:KNLHH_bGOs0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=yZ2FWlPodNU:KNLHH_bGOs0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=yZ2FWlPodNU:KNLHH_bGOs0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=yZ2FWlPodNU:KNLHH_bGOs0:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=yZ2FWlPodNU:KNLHH_bGOs0:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/09/10/git-local-pre-commit-hook.aspx</feedburner:origLink></item><item><title>Git Post-receive hook with integrity post call</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/xNNEp7Up4sA/git-post-receive-hook-with-integrity-post-call.aspx</link><pubDate>Fri, 17 Jul 2009 05:01:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:23051</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>2</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/07/17/git-post-receive-hook-with-integrity-post-call.aspx#comments</comments><description>&lt;p&gt;Using the following code:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/119297.js"&gt;&lt;/script&gt;
&lt;/p&gt;
&lt;p&gt;This git post-receive hook script queries the latest commit, gets the
revision changes, and then passes that payload (via json) to a
net/https POST call. I setup our &lt;a href="http://www.integrityapp.com/" target="_blank"&gt;Integrity CI server&lt;/a&gt; with a self-signed certificate and HTTP basic authentication.&lt;br /&gt;&lt;br /&gt;The
Net::HTTP::Post.new instantiation group handles populating the basic
authentication information and putting the payload into the form data
of the request. The Net::HTTP.new group handles telling the request
that it will be via SSL (443) and to not verify the SSL certificate
(since I'm using a self-signed certificate; otherwise, I'd get a
warning and kill my automation process)&lt;br /&gt;&lt;br /&gt;The other important part is the "if pid = fork".  The ruby &lt;a href="http://www.ruby-doc.org/core/classes/Process.html#M003179" target="_blank"&gt;fork&lt;/a&gt;
command allows code to happen in the background, in the case the POST
call, and therefore make the call synchronous. Otherwise, when the
developers commit their code to the repository, they will have to wait
for the build to finish before their prompt will be returned to them.
fork will return zero (0) if it fails to create the background process.&lt;br /&gt;&lt;br /&gt;I'm
still checking whether the zombie process warning in the rdoc (for the
fork command) is a problem. I'll update this if it is.&lt;br /&gt;&lt;br /&gt;The last line is notification for the user so they know what's going on. Always good to keep the user in the loop. :)
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Git+Post-receive+hook+with+integrity+post+call&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f07%2f17%2fgit-post-receive-hook-with-integrity-post-call.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f07%2f17%2fgit-post-receive-hook-with-integrity-post-call.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=23051" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=xNNEp7Up4sA:GETSKBDLq34:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=xNNEp7Up4sA:GETSKBDLq34:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=xNNEp7Up4sA:GETSKBDLq34:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=xNNEp7Up4sA:GETSKBDLq34:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=xNNEp7Up4sA:GETSKBDLq34:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=xNNEp7Up4sA:GETSKBDLq34:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=xNNEp7Up4sA:GETSKBDLq34:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/integrityapp/default.aspx">integrityapp</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/07/17/git-post-receive-hook-with-integrity-post-call.aspx</feedburner:origLink></item><item><title>Git For Windows Developers – Git Series – Part 3</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/jLnAgCf0c3Q/git-for-windows-developers-git-series-part-3.aspx</link><pubDate>Mon, 08 Jun 2009 02:45:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21604</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>11</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx#comments</comments><description>&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx"&gt;Git For Windows Developers - Git Series - Part 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/04/git-for-windows-developers-git-series-part-2.aspx"&gt;Git For Windows Developers - Git Series - Part 2&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx"&gt;Git For Windows Developers - Git Series - Part 3&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;&lt;b&gt;THE .GIT FOLDER&lt;/b&gt;&lt;/h1&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Note&lt;/i&gt;&lt;/b&gt;: The SHA1s and tags in this post are unique to my system.&amp;nbsp; The examples with SHA1s will not work on your system if you try the commands verbatim.&amp;nbsp; The commands that use tags will work if you name your tags the same.&lt;/p&gt;
&lt;p&gt;When you run &amp;ldquo;&lt;b&gt;git init&lt;/b&gt;&amp;rdquo; in a directory locally or &amp;ldquo;&lt;b&gt;git clone&amp;hellip;&lt;/b&gt;&amp;rdquo; to bring an existing git repository down locally, that folder would now have a subdirectory called .git.&amp;nbsp; This folder is the &amp;ldquo;soul&amp;rdquo; of git.&amp;nbsp; If I run &amp;ldquo;ls &amp;ndash;al&amp;rdquo; on my /c/code/console_app/.git folder I see the following folder structure:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_48D7CE77.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_2682C9AF.png" border="0" height="328" width="718" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Notice the &amp;ldquo;(GIT_DIR!)&amp;rdquo; text to the right on my console prompt.&amp;nbsp; Msysgit is helping me by reminding me what folder I&amp;rsquo;m in. Also notice that I have a bunch of files and five folders (hooks, info, logs, objects and refs).&amp;nbsp; I&amp;rsquo;m going to explain each directory then each file.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;hooks&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_29D5F62E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_04D835B5.png" border="0" height="103" width="727" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of files that you can populate with scripts that will execute during certain times in the Git event model.&amp;nbsp; These files are simply samples of what event hooks are available (hence the file extension of .sample).&amp;nbsp; I&amp;rsquo;ve created post-receive hooks for continuous integration (CI) events in the past.&amp;nbsp; &lt;a href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/03/24/adding-a-git-post-receive-hook-to-fire-off-hudson-ci-server.aspx" target="_blank"&gt;Here&lt;/a&gt; is a previous post I wrote on setting up a post-receive hook to work with a Hudson CI server that has a self-signed certificate and uses HTTP basic authentication.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;info&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3B48E7B7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0878E143.png" border="0" height="147" width="736" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of an exclude file that is the same as the .gitignore file but is not including in the repository itself and therefore is not versioned.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;logs&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Consists of a file, HEAD, and a subdirectory, refs, which has the history of the interactions with branches, both local and remote.&amp;nbsp; The local branches (.git/logs/refs/heads/&amp;hellip;) show commands like &amp;ldquo;&lt;b&gt;git commit&amp;rdquo;&lt;/b&gt;, &amp;ldquo;&lt;b&gt;git rebase&lt;/b&gt;&amp;rdquo;, &amp;ldquo;&lt;b&gt;git reset&lt;/b&gt;&amp;rdquo;, etc.&amp;nbsp; The remote branches (.git/logs/refs/remotes/&amp;hellip;) are usually &amp;ldquo;&lt;b&gt;git fetch&lt;/b&gt;&amp;rdquo;, &amp;ldquo;&lt;b&gt;git pull&lt;/b&gt;&amp;rdquo; or &amp;ldquo;&lt;b&gt;git push&lt;/b&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_33C008FB.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_5541C93B.png" border="0" height="624" width="730" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I run &amp;ldquo;cat HEAD&amp;rdquo; I see all the commits I&amp;rsquo;ve issued from both my local master and local user_prompt branch. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_664B1880.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_39584656.png" border="0" height="769" width="734" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;b&gt;GIT REFLOG&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;This file seems to just be a list of commits that I&amp;rsquo;ve made on all the branches I&amp;rsquo;ve used (even on the user_prompt branch which does not exist any longer).&amp;nbsp; A better way to view this is via the &amp;ldquo;&lt;b&gt;git reflog&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_02A29D65.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_56F46419.png" border="0" height="282" width="746" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This command &amp;ldquo;is a mechanism to record when the tip of branches are updated.&amp;nbsp; This command is to manage the information recorded in it&amp;rdquo;. (&lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-reflog.html" target="_blank"&gt;git-reflog&lt;/a&gt;)&amp;nbsp; Any action I perform inside Git, when data is committed to the local repository, it is logged here to the reflog, aka the .git/logs/HEAD file.&amp;nbsp; I have heard of Git users being able to recover commits after they reset the HEAD back a few commits.&amp;nbsp; I have not personally tried this.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;objects&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0ABEEB1C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1ED807A5.png" border="0" height="112" width="747" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of all your objects (duh!).&amp;nbsp; What are the objects?&amp;nbsp; That&amp;rsquo;s a little ambiguous.&amp;nbsp; It looks like a bunch of two character alpha-numeric folders, plus info and pack folders.&amp;nbsp; In Git, objects are blobs, trees, commits, and tags.&amp;nbsp; What are the two characters?&amp;nbsp; They are the first two characters of an objects SHA1.&amp;nbsp; Then the files in those folders are named with the remaining 38 characters. (i.e., 9a438f1e971835a3ad724eb408a68fae45d7470a would translate to .git/objects/9a/438f1e971835a3ad724eb408a68fae45d7470a)&lt;/p&gt;
&lt;h3&gt;&lt;b&gt;BLOB&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;A blob is generally a file.   &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_03360C60.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_77341C2B.png" border="0" height="210" width="206" /&gt;&lt;/a&gt;     &lt;br /&gt;(&lt;a title="http://book.git-scm.com/assets/images/figure/object-blob.png" href="http://book.git-scm.com/assets/images/figure/object-blob.png"&gt;http://book.git-scm.com/assets/images/figure/object-blob.png&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Consists of the binary content that is stored in the blob.&amp;nbsp; No filename.&amp;nbsp; Really?&amp;nbsp; Yep.&amp;nbsp; Git does not track files, it tracks content.&amp;nbsp; So if you have two files with the same content but different names (shame on you for violating &amp;ldquo;&lt;a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" target="_blank"&gt;Don&amp;rsquo;t Repeat Yourself (DRY)&lt;/a&gt;&amp;rdquo;) they will most likely point at the same blob object.&amp;nbsp; &amp;ldquo;The object is totally independent of its location in the directory tree&amp;hellip;&amp;rdquo;.&amp;nbsp; This is usually handled by tree objects.&amp;nbsp; &amp;ldquo;&amp;hellip;and renaming a file does not change the object that the file is associated with&amp;rdquo; (&lt;a title="http://book.git-scm.com/1_the_git_object_model.html" href="http://book.git-scm.com/1_the_git_object_model.html"&gt;http://book.git-scm.com/1_the_git_object_model.html&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;When I issue the &amp;ldquo;&lt;b&gt;git show 0e0fdc6&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0DF5F466.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_71E7C62B.png" border="0" height="317" width="747" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;where 0e0fdc6 is the SHA1 of the solution file on my initial commit, I see the files contents.&amp;nbsp; &amp;ldquo;&lt;b&gt;git show&lt;/b&gt;&amp;rdquo; is a way to view information about Git objects (blobs, commits, trees, tags).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;TREE&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A tree usually represents a directory or sub-directory, containing a list of other trees and blobs.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_43249E3A.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7A018331.png" border="0" height="215" width="207" /&gt;&lt;/a&gt;     &lt;br /&gt;(&lt;a title="http://book.git-scm.com/assets/images/figure/object-tree.png" href="http://book.git-scm.com/assets/images/figure/object-tree.png"&gt;http://book.git-scm.com/assets/images/figure/object-tree.png&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Consists of the type, SHA1 and filename of blobs and sub-trees.&amp;nbsp; When I run the &amp;ldquo;&lt;b&gt;git ls-tree 97107ec&lt;/b&gt;&amp;ldquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_5503C2B8.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0BE0A7B0.png" border="0" height="122" width="748" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;with 97107ec being the SHA1 of the tree that my initial commit points to (shown in commit section below).&amp;nbsp;&amp;nbsp; If I issue a &amp;ldquo;&lt;b&gt;git show 97107ec&lt;/b&gt;&amp;rdquo; on this tree SHA1:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1B17107D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_16345CC1.png" border="0" height="204" width="754" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I see the names of the contents, but not the types or SHA1s. &lt;/p&gt;
&lt;h3&gt;&lt;b&gt;COMMIT&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;A commit is a pointer to the SHA1 of a tree.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2C8A0206.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_155E8788.png" border="0" height="234" width="206" /&gt;&lt;/a&gt;     &lt;br /&gt;(&lt;a title="http://book.git-scm.com/assets/images/figure/object-commit.png" href="http://book.git-scm.com/assets/images/figure/object-commit.png"&gt;http://book.git-scm.com/assets/images/figure/object-commit.png&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Consists of the SHA1 of the tree it&amp;rsquo;s pointing at, the SHA1 of the parent commit, if not the initial commit, and the names of the author and committer.&amp;nbsp; Huh?&amp;nbsp; There&amp;rsquo;s a difference between the author and the committer.&amp;nbsp; Imagine you write a patch for an open source project.&amp;nbsp; When you tell the owner of the project to pull from your repository, you are the author, but they would the person committing it to the primary repository, the committer.&amp;nbsp; If I issue the &amp;ldquo;&lt;b&gt;git show &amp;ndash;s --pretty=raw 1731c38&lt;/b&gt;&amp;ldquo; command, where 1731c38 is the SHA1 of my &amp;ldquo;initial commit&amp;rdquo; commit:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_451C3007.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_201E6F8E.png" border="0" height="171" width="744" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I see the tree SHA1 that the commit points to, the author and the committer, who happen to both be me. If I just issue a regular &amp;ldquo;&lt;b&gt;git show 1731c83&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4AF96451.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3CBD7C12.png" border="0" height="951" width="750" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I actually see the diffs for all changes in the commit.&amp;nbsp; Since this was the initial commit SHA1, I see lots of plus signs (+) in the diffs.&lt;/p&gt;
&lt;h3&gt;&lt;b&gt;TAG&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;A tag is a pointer to the SHA1 of a Git object.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_19266F1C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_370783CE.png" border="0" height="214" width="206" /&gt;&lt;/a&gt;    &lt;br /&gt;(&lt;a title="http://book.git-scm.com/assets/images/figure/object-tag.png" href="http://book.git-scm.com/assets/images/figure/object-tag.png"&gt;http://book.git-scm.com/assets/images/figure/object-tag.png&lt;/a&gt;) &lt;/p&gt;
&lt;p&gt;Consists of an object SHA1, the type of object the SHA1 represents and the name of the person who issued the tag, the tagger.&amp;nbsp; I issue the &amp;ldquo;&lt;b&gt;git tag v0.1 &amp;ndash;m &amp;lsquo;v0.1&amp;rsquo;&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3FF7160D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_14464C11.png" border="0" height="57" width="753" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This creates the tag object in the .git/objects/ folder.&amp;nbsp; If I run the &amp;ldquo;&lt;b&gt;git cat-file tag v0.1&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7D1AD192.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_78381DD6.png" border="0" height="194" width="764" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This shows me the three items that make up a tag, object SHA1, type, and tagger.&amp;nbsp; If I issue a regular &amp;ldquo;&lt;b&gt;git show v0.1&lt;/b&gt;&amp;rdquo; against the new tag:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0A174255.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_401BC162.png" border="0" height="347" width="767" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I see the tag information and also the information for the git object it points to; a git commit in this case.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;refs&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6680355E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4CABFF2F.png" border="0" height="150" width="747" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the master copy of all remote tracking branches (.git/refs/remotes), local branches (.git/refs/heads), tags (.git/refs/tags), and the stash (.git/refs/stash), when used.&amp;nbsp; Master copy?&amp;nbsp; What does that mean?&amp;nbsp; Well, when I issue &amp;ldquo;&lt;b&gt;git checkout dev&lt;/b&gt;&amp;rdquo; and checkout the checkout the master copy of the local dev branch, I&amp;rsquo;m replacing my working directory with a copy of .git/refs/heads/dev.&amp;nbsp; If I then issue &amp;ldquo;&lt;b&gt;git checkout master&lt;/b&gt;&amp;rdquo; I&amp;rsquo;m replacing my working directory with .git/refs/heads/master, or a master copy of the local master branch.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The .git/refs/heads/master file, in my case, points to the latest commit for the local master branch.&amp;nbsp; In this case it&amp;rsquo;s the 41509ff SHA1:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_05C56CE3.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_52F5666E.png" border="0" height="64" width="760" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since we are in sync with the remote origin/master branch, the .git/refs/remotes/origin/master file points to the same SHA1:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_30A061A6.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_12C1DDA5.png" border="0" height="73" width="762" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The .git/refs/tags/v0.1 file points to the 8690e95 SHA1:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4689D3F6.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_28AB4FF5.png" border="0" height="65" width="770" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;which is a Git tag object (.git/objects/86/90e95&amp;hellip;) that points to commit 41509ff as we saw above in the Git tag object section.&amp;nbsp; So what this means is that currently all my git refs point to the same commit, 41509ff, more or less.&lt;/p&gt;
&lt;p&gt;There is another type of git ref, stash, that I will talk about in a future post, but just know for now that the stash is located at .git/refs/stash/.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;COMMIT_EDITMSG&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_06564B2D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_45B3FEBD.png" border="0" height="69" width="780" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the last commit message.&amp;nbsp; From other readings, this seems to not even be used by git and is simply hear for reference.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;FETCH_HEAD&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7571A73C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4C6998F1.png" border="0" height="76" width="791" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the SHA1s of branch/remote heads that were updated during the last &amp;ldquo;&lt;b&gt;git fetch&lt;/b&gt;&amp;rdquo;.&amp;nbsp; The last fetch occurred automatically when I pulled changes from my local user_prompt branch into my local master branch.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;HEAD&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_204C9C00.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_228924BC.png" border="0" height="73" width="791" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the current reference that you are set to (usually a branch).&amp;nbsp; Normally master (aka .git/refs/heads/master).&amp;nbsp; I&amp;rsquo;m currently set to my local master branch.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;ORIG_HEAD&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_24597A83.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3468493A.png" border="0" height="74" width="801" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the SHA1 of the branch I did the last &amp;ldquo;&lt;b&gt;git merge&lt;/b&gt;&amp;rdquo; &lt;i&gt;into&lt;/i&gt;.&amp;nbsp; In this case it&amp;rsquo;s the SHA1 of my local master branch before I pulled in the changes of my local user_prompt branch.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;config&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_161D9244.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1F0D2483.png" border="0" height="313" width="802" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Consists of the settings for this repository.&amp;nbsp; I personally rarely edit this file and use the &amp;ldquo;git config&lt;b&gt; &amp;hellip;&lt;/b&gt;&amp;rdquo; command with options.&amp;nbsp; Read &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-config.html" target="_blank"&gt;here&lt;/a&gt; for all the possible settings.&amp;nbsp; I highly recommend the &amp;ldquo;git config color.*&amp;rdquo; commands to set color for your git commands and results.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;description&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Consists of a description that will usually be displayed if I were hosting this repository on &lt;a href="http://git.or.cz/gitwiki/Gitweb" target="_blank"&gt;gitweb&lt;/a&gt; or with git instaweb.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;index&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_42C8DCCE.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_12A1920B.png" border="0" height="293" width="811" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is the &amp;ldquo;staging area&amp;rdquo; I&amp;rsquo;ve talked about in the past two posts.&amp;nbsp; This is the area you prepare so that you can make one commit to your local repository.&amp;nbsp; It consists of meta-data such as filenames, timestamps, and SHA1s.&amp;nbsp; &lt;b&gt;DO NOT EDIT THIS FILE MANUALLY&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;SUMMARY&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;That is a rough introduction to the .git folder.&amp;nbsp; I mainly only ever interact with the config file and the hooks folder.&lt;/p&gt;
&lt;p&gt;The two biggest concepts to take from this are the objects and refs.&amp;nbsp; Objects are blobs, commits, trees, and tags.&amp;nbsp; Refs are branches, remotes, tags, and the stash queue.&amp;nbsp; Once you completely understand that, interacting with Git will most likely become easier.&lt;/p&gt;
&lt;p&gt;My next post will be on tortoisegit to satisfy the GUI users amongst you.&amp;nbsp; The following post will be concurrent development and then a post on little gotchas and lessons learned.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Git+For+Windows+Developers+%e2%80%93+Git+Series+%e2%80%93+Part+3&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f07%2fgit-for-windows-developers-git-series-part-3.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f07%2fgit-for-windows-developers-git-series-part-3.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21604" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=jLnAgCf0c3Q:XVbpQQdj4C8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=jLnAgCf0c3Q:XVbpQQdj4C8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=jLnAgCf0c3Q:XVbpQQdj4C8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=jLnAgCf0c3Q:XVbpQQdj4C8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=jLnAgCf0c3Q:XVbpQQdj4C8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=jLnAgCf0c3Q:XVbpQQdj4C8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=jLnAgCf0c3Q:XVbpQQdj4C8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/windows/default.aspx">windows</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx</feedburner:origLink></item><item><title>Git For Windows Developers – Git Series – Part 2</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/Sh-ptiTeyz8/git-for-windows-developers-git-series-part-2.aspx</link><pubDate>Thu, 04 Jun 2009 05:49:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21501</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>30</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/04/git-for-windows-developers-git-series-part-2.aspx#comments</comments><description>&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx"&gt;Git For Windows Developers - Git Series - Part 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/04/git-for-windows-developers-git-series-part-2.aspx"&gt;Git For Windows Developers - Git Series - Part 2&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx"&gt;Git For Windows Developers - Git Series - Part 3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NOTICE:&amp;nbsp; I know that there are good tools out there besides Git Bash.&amp;nbsp; I will do a post talking about each one (tortoisegit, Git extensions, etc) after I get all the Git commands and scenarios squared away.&lt;/p&gt;
&lt;p&gt;Please make sure you&amp;rsquo;ve read the &lt;a href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx" target="_blank"&gt;first post&lt;/a&gt; and have created your SSH private and public keys.&amp;nbsp; You should also have a very basic understanding of the git init, add, commit, and log commands.&amp;nbsp; We will dive deeper on each of those.&amp;nbsp; We also visit git checkout, pull (&amp;mdash;squash), push, remote, diff, log, mv.&amp;nbsp; I&amp;rsquo;ve done my best at making each git command that is mentioned in text to be of bold weight.&amp;nbsp; Each image, if a command is involved, has that command in big text before it.&lt;/p&gt;
&lt;p&gt;This post is going to go over my typical workflow for work.&amp;nbsp; I&amp;rsquo;ll get as detailed as I can for this process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;git pull origin master &lt;/li&gt;
&lt;li&gt;git checkout &amp;ndash;b user_prompt &lt;/li&gt;
&lt;li&gt;&amp;lt;code&amp;gt; &lt;/li&gt;
&lt;li&gt;git add &amp;lt;filename&amp;gt; (as necessary) &lt;/li&gt;
&lt;li&gt;git commit &amp;ndash;a &amp;ndash;m &amp;ldquo;commit message&amp;rdquo; &lt;/li&gt;
&lt;li&gt;repeat step 3-5 as many times as necessary &lt;/li&gt;
&lt;li&gt;git checkout master &lt;/li&gt;
&lt;li&gt;git pull &amp;ndash;-squash . user_prompt &lt;/li&gt;
&lt;li&gt;git commit &amp;ndash;a &amp;ndash;m &amp;ldquo;add name validation and tests&amp;rdquo; &lt;/li&gt;
&lt;li&gt;git pull origin master &lt;/li&gt;
&lt;li&gt;git push origin master &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For this example, we&amp;rsquo;re going to create a &lt;b&gt;remote&lt;/b&gt; public git repository on &lt;a href="http://www.github.com" target="_blank"&gt;Github.com&lt;/a&gt;.&amp;nbsp; What is &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt;?&amp;nbsp; &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt; is the most popular Git repository hosting website on the Internets (misspelled on purpose) today, in my opinion.&lt;/p&gt;
&lt;p&gt;First, I&amp;rsquo;m going to create my &lt;a href="http://github.com" target="_blank"&gt;github.com&lt;/a&gt; account.&amp;nbsp; I go to &lt;a href="http://www.github.com"&gt;http://www.github.com&lt;/a&gt; and click the &amp;ldquo;Pricing and Setup&amp;rdquo; link:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0FD07CAE.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_314FAC3D.png" border="0" height="172" width="750" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next, I click the &amp;ldquo;Signup&amp;rdquo; link next to the &amp;ldquo;Free!&amp;rdquo; account (Once you get comfortable, upgrading is easy):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_35C8BDB5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_129B5303.png" border="0" height="332" width="600" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now I need to copy my public ssh key (id_rsa.pub) that I created from the first post into the Windows clipboard, so I can paste it to the web UI on this next step.&amp;nbsp; That means opening Notepad (Windows, type notepad and choose it from the results [Vista/Windows 7] or Start-&amp;gt;Programs-&amp;gt;Accessories-&amp;gt;Notepad [2000/XP]) and choose File-&amp;gt;Open&amp;nbsp; and go to my user folder and then the .ssh folder and choose the id_rsa.pub (C:\Users\jmeridth\.ssh\id_rsa.pub).&amp;nbsp; I noticed that the default file extension that notepad searched for was text files (*.txt).&amp;nbsp; I had to change the drop-down in the bottom right corner to &amp;ldquo;All Files (*.*)&amp;rdquo; and then I was able to see my files in the .ssh folder.&amp;nbsp; We are using notepad because it won&amp;rsquo;t put any hidden newlines into the content we are trying to copy and paste to Github.com.&amp;nbsp; &lt;i&gt;We will talk about this later in the post.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7282D6F6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4F556C44.png" border="0" height="406" width="600" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I chose the id_rsa.pub file and it showed in notepad.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7A306107.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_42E9D9CC.png" border="0" height="202" width="613" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Press ctrl+A and then ctrl+c (or Edit-&amp;gt;Select All and Edit-&amp;gt;Copy).&amp;nbsp; Go back to the Github signup page and input your information.&amp;nbsp; I paste (ctrl+v) the id_rsa.pub key I saved into the Windows clipboard into the SSH Key box:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2918344E.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_28AE920A.png" border="0" height="486" width="607" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I click &amp;ldquo;I agree, sign me up!&amp;rdquo; and I am taken to my dashboard (at least I think so, I&amp;rsquo;m not actually clicking this since I already have an account).&amp;nbsp; I create the remote public repository for this series on &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt; by clicking the &amp;ldquo;Create a new one&amp;rdquo; link on the right side near &amp;ldquo;Your Repositories&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_65661A9A.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_47879699.png" border="0" height="92" width="535" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I fill in the name, description, and web page for the repository.&amp;nbsp; I&amp;rsquo;m sticking with the console_app:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_05178514.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_690956D9.png" border="0" height="338" width="617" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I click &amp;ldquo;Create Repository&amp;rdquo; and I&amp;rsquo;m taken to a very informational page:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_061205A2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4C91865B.png" border="0" height="450" width="619" /&gt;&lt;/a&gt;     &lt;br /&gt;(the user.name and user.email suggestions are different than the examples above due to me creating this repository under my real github.com account).&lt;/p&gt;
&lt;p&gt;Above this information is the part I need for this post:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6523B45C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_5FD4CDAB.png" border="0" height="88" width="613" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Really, just this part:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0468EBE1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_389D1527.png" border="0" height="47" width="613" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I open Git Bash and go to my repository that I created in the last post (/c/code/console_app):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_613B812E.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_637809EA.png" border="0" height="71" width="623" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;FINALLY, GIT COMMANDS:&lt;/h2&gt;
&lt;h2&gt;&lt;b&gt;GIT BRANCH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE: &lt;/b&gt;You can clear your Git Bash screen by pressing Ctrl+L on the keyboard.&amp;nbsp; This works in most bash terminals.&lt;/p&gt;
&lt;p&gt;Normally, I run &amp;ldquo;&lt;b&gt;git branch&lt;/b&gt;&amp;rdquo; to see what branch I am on, but msysgit let&amp;rsquo;s me know via the end of my bash prompt &amp;ldquo;(master)&amp;rdquo;.&amp;nbsp; I&amp;rsquo;m going to check anyway:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6C679C29.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_40B6D22D.png" border="0" height="82" width="628" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The branch name with the asterisk (*) next to it is the active branch.&amp;nbsp; In this case I only have the one branch, master. I paid particular attention the the &amp;ldquo;Existing Git Repo?&amp;rdquo; section of the informational page on my &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt; console_app information page:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_108F876A.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0BACD3AE.png" border="0" height="122" width="635" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT REMOTE&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I already di the cd command (cd /c/code/console_app).&amp;nbsp; I then type the &amp;ldquo;&lt;b&gt;git remote &amp;hellip;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2D2C033D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0F4D7F3C.png" border="0" height="59" width="633" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;What the?&amp;nbsp; Okay, the command is &amp;ldquo;git remote&amp;rdquo; with the &amp;ldquo;add&amp;rdquo;, &amp;ldquo;origin&amp;rdquo;, and &lt;a href="mailto:&amp;ldquo;git@github.com:armmer/console_app.git"&gt;&amp;ldquo;git@github.com:armmer/console_app.git&lt;/a&gt;&amp;rdquo; parameters.&amp;nbsp; The &amp;ldquo;git remote&amp;rdquo; command with the &amp;ldquo;add&amp;rdquo; parameter tells your local git repository that you are adding the path/URL/location of a remote repository that you want to watch.&amp;nbsp; In this case we&amp;rsquo;re going to label this remote repository &amp;ldquo;origin&amp;rdquo; and the location is &lt;a href="mailto:&amp;ldquo;git@github.com:armmer/console_app.git"&gt;&amp;ldquo;git@github.com:armmer/console_app.git&lt;/a&gt;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt;&amp;nbsp; &lt;a href="mailto:git@github.com/armmer/console_app.git"&gt;git@github.com:armmer/console_app.git&lt;/a&gt; doesn&amp;rsquo;t look like a HTTP URL or a ssh:// protocol.&amp;nbsp; What protocol is that?&amp;nbsp; It is still SSH.&amp;nbsp; The git protocol, usually using port 9418, is used for clone, fetch, or pull (i.e., git://github.com/armmer/console_app.git). Please reference Stefan's comment below for more details.&lt;/p&gt;
&lt;p&gt;Now I have told my local repository to watch my newly created &lt;a href="http://github.com" target="_blank"&gt;github.com&lt;/a&gt; remote public repository.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT LOG&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I run &amp;ldquo;&lt;b&gt;git log&lt;/b&gt;&amp;rdquo; again to see the changes we made in the first post:     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_799F926D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7B03B53F.png" border="0" height="137" width="637" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT PUSH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Okay, I am going to push this code up to the &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt; repository.&amp;nbsp; Look at the last step of the &amp;ldquo;Existing Git Repo?&amp;rdquo; information from &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt;.&amp;nbsp; I type the &amp;ldquo;&lt;b&gt;git push origin master&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1F818589.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7D2C80C0.png" border="0" height="165" width="647" /&gt;&lt;/a&gt;     &lt;br /&gt;(UPDATE:&amp;nbsp; This screenshot is a newer one and has the incorrect object count.&amp;nbsp; This is to show the prompt for the host authenticity)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;UPDATE: &lt;/i&gt;&lt;/b&gt;During the push, you will most likely get prompted for host authenticity.&amp;nbsp; Make sure you type &amp;lsquo;yes&amp;rsquo;, the full word.&amp;nbsp; Not just &amp;lsquo;y&amp;rsquo;.&amp;nbsp; This will add github.com&amp;rsquo;s public RSA key to your ~/.ssh/known_hosts file so that you won&amp;rsquo;t get prompted for this again on any future push.&amp;nbsp; This let&amp;rsquo;s your system know that you trust github.com and let&amp;rsquo;s github.com know that you trust it.&amp;nbsp; After you say yes the files are pushed up to the remote repository.&lt;/p&gt;
&lt;p&gt;Success!!&amp;nbsp; It counted the objects, compressed them and wrote them up to the remote repository.&amp;nbsp; This command translates to &amp;ldquo;I am pushing my local master branch to the master branch of the remote repository I have labelled origin&amp;rdquo;.&amp;nbsp; Where does it mention the local master branch in that command?&amp;nbsp; It doesn&amp;rsquo;t.&amp;nbsp; It&amp;rsquo;s the convention.&amp;nbsp; If no local branch is mentioned explicitly, the master branch is used. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt;&amp;nbsp; To push another local branch, I&amp;rsquo;d type &amp;ldquo;git push origin user_prompt:master&amp;rdquo; or &amp;ldquo;git push origin HEAD:master&amp;rdquo; if you just want to push the current local branch without having to remember it&amp;rsquo;s name.&lt;/p&gt;
&lt;p&gt;Now we go back to the github.com repository main page and see the code and commit log:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_45548EFA.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_24CFDFF9.png" border="0" height="378" width="759" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;My code is now remote and stored on Github.com.&amp;nbsp; Sweet.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt;&amp;nbsp; If you get a &amp;ldquo;permission denied&amp;rdquo; or other errors, it is most likely ssh key related, hence, my emphasis on them.&amp;nbsp; Check out &lt;a href="http://github.com/guides/addressing-authentication-problems-with-ssh" target="_blank"&gt;this link&lt;/a&gt; for ideas/help.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT CHECKOUT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Now let&amp;rsquo;s imagine that we have a task that states &amp;ldquo;Prompt user for their name and say hello back to them, including their name&amp;rdquo;.&amp;nbsp; I create a new branch locally so I have a separate place to do my active development for this task.&amp;nbsp; I issue the command &amp;ldquo;&lt;b&gt;git checkout -b user_prompt&lt;/b&gt;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_03DEFE03.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_66007A01.png" border="0" height="123" width="637" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;A couple things to notice:&lt;/p&gt;
&lt;p&gt;1. It says &amp;ldquo;Switched to a new branch &amp;lsquo;user_prompt&amp;rsquo;&amp;rdquo;.&amp;nbsp; The &amp;ldquo;&lt;b&gt;git checkout &amp;ndash;b&lt;/b&gt;&amp;rdquo; command creates a new branch by the name following the command and then checks it out automatically.&amp;nbsp; This is the shorthand version of doing &amp;ldquo;&lt;b&gt;git branch user_prompt&lt;/b&gt;&amp;rdquo; and then &amp;ldquo;&lt;b&gt;git checkout user_prompt&lt;/b&gt;&amp;rdquo;.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT BRANCH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;2. It shows the &amp;ldquo;(user_prompt)&amp;rdquo; text at the end of my bash prompt now.&amp;nbsp; That means that I&amp;rsquo;m on the user_prompt branch.&amp;nbsp; To verify, I issue the &amp;ldquo;&lt;b&gt;git branch&lt;/b&gt;&amp;rdquo; command.&amp;nbsp; This lists all the local branches.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_75A315C3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3500C954.png" border="0" height="74" width="646" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Again, the name with the asterisk (*) next to it is the active branch.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I make the code change:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4BC2A18E.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_18F52BCB.png" border="0" height="393" width="657" /&gt;&lt;/a&gt;     &lt;br /&gt;(I have a &amp;ldquo;Console.ReadLine();&amp;rdquo; as the last line so the window doesn&amp;rsquo;t automatically close.&amp;nbsp; I have to press a carriage return to close it.&amp;nbsp; So I can read the output)&lt;/p&gt;
&lt;p&gt;In all honesty, I wouldn&amp;rsquo;t test something like this, because I&amp;rsquo;d be testing the Framework.&amp;nbsp; I test it manually and it works:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_311B26D7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_056A5CDB.png" border="0" height="84" width="254" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I commit my code to the repository.&amp;nbsp; I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; to see what the status is between the staging area and the working directory:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_606C9C61.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_50605E5B.png" border="0" height="138" width="662" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This tells me because I edited the Program.cs file it is &amp;ldquo;Changed by not updated&amp;rdquo;.&amp;nbsp; What does that mean?&amp;nbsp; It means it&amp;rsquo;s changed in my working directory, but not staged (not in my staging area or ready for commit).&amp;nbsp; If I tried to commit right now, nothing would be committed because nothing is in my staging area.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Example of running &amp;ldquo;&lt;b&gt;git commit &amp;hellip;&lt;/b&gt;&amp;rdquo; without adding files to the staging area:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_54D96FD3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_16DFDF15.png" border="0" height="143" width="671" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT ADD&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I add Program.cs to my staging area with the &amp;ldquo;&lt;b&gt;git add Program.cs&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4D509117.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0CAE44A8.png" border="0" height="49" width="680" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; again:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7582CA29.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_65768C23.png" border="0" height="152" width="688" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The Program.cs file has been added to the staging area.&amp;nbsp; How do you know that?&amp;nbsp; Well, it is under the &amp;ldquo;Changes to be committed&amp;rdquo; section.&amp;nbsp; That is synonymous with the staging area.&amp;nbsp; Why don&amp;rsquo;t they just put that there: &amp;ldquo;Staging Area&amp;rdquo;?&amp;nbsp; Good question.&amp;nbsp; I don&amp;rsquo;t know.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt; Notice every time I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; the first thing I&amp;rsquo;m told is what branch I&amp;rsquo;m on.&amp;nbsp; It&amp;rsquo;s nice to be reminded of that &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Now I commit it to the local repository with the &amp;ldquo;&lt;b&gt;git commit &amp;ndash;m &amp;lsquo;prompt user for name and say hello back&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_02EB6DE1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_501B676C.png" border="0" height="82" width="693" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Nice.&amp;nbsp; Okay, we&amp;rsquo;re going to roll back, add the code again and commit in the &amp;ldquo;common&amp;rdquo; way.&amp;nbsp; Huh?&amp;nbsp; &amp;ldquo;Common way&amp;rdquo;?&amp;nbsp; Most people do not do the &amp;ldquo;git add&amp;rdquo; and then &amp;ldquo;git commit &amp;ndash;m &amp;hellip;&amp;rdquo;.&amp;nbsp; They, like myself, use the &amp;ldquo;git commit &amp;ndash;a &amp;ndash;m &amp;hellip;&amp;rdquo;.&amp;nbsp; The &amp;ldquo;-a&amp;rdquo; automatically adds all tracked changes from your working directory to the staging area.&amp;nbsp; This &lt;b&gt;does not include&lt;/b&gt; new files that aren&amp;rsquo;t tracked by the repository.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT RESET&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I roll back one commit clearing my staging area and working directory with the &amp;ldquo;&lt;b&gt;git reset --hard HEAD^&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_549478E4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3AC042B5.png" border="0" height="156" width="693" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;What is the &amp;ldquo;HEAD^&amp;rdquo; portion of that command"?&amp;nbsp; It means I want to reset the commits to one prior (^) to the HEAD (aka, the latest commit).&lt;/p&gt;
&lt;p&gt;The result is &amp;ldquo;HEAD is now at 1731c83 initial commit&amp;rdquo;.&amp;nbsp; That was the commit I did in the last post.&amp;nbsp; This branch has been rolled back to that commit.&amp;nbsp; The new commit I just did was destroyed from history. &lt;i&gt;I will talk about undoing changes in greater detail in a future post.&lt;/i&gt;&amp;nbsp;&amp;nbsp; I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; too and see that my working directory is clean.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE: &lt;/b&gt;If you just want to clear your working directory and staging area, but not the latest commit, just issue a &amp;ldquo;&lt;b&gt;git reset &amp;ndash;-hard&lt;/b&gt;&amp;rdquo; command without the &amp;ldquo;HEAD^&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;REFRESHER:&lt;/b&gt; What is the 1731c83?&amp;nbsp; It is the first 7 digits of the SHA1 hash, talked about in the first post, that was assigned to my &amp;ldquo;initial commit&amp;rdquo;.&amp;nbsp; Seven digits are all you need from the front of the commit to identify it uniquely.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I add the code change back and run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; again:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_66076A6D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_280DD9AF.png" border="0" height="143" width="687" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Notice git even suggests the &amp;ldquo;git commit &amp;ndash;a&amp;rdquo; notation?&amp;nbsp; I run &amp;ldquo;&lt;b&gt;git commit &amp;ndash;a &amp;ndash;m &amp;lsquo;prompt user for name and say hello back&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4582BB6C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_79B6E4B2.png" border="0" height="85" width="698" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Same result as the &amp;ldquo;&lt;b&gt;git add&amp;hellip;&lt;/b&gt;&amp;rdquo; &amp;ldquo;&lt;b&gt;git commit &amp;ndash;m&amp;hellip;&lt;/b&gt;&amp;rdquo;, just shorter syntax.&amp;nbsp; Moving on.&lt;/p&gt;
&lt;p&gt;Low and behold, the user then comes by and states, &amp;ldquo;Oh yeah, the name can&amp;rsquo;t have any numbers in it.&amp;rdquo;&amp;nbsp; That' means I need to add more code.&amp;nbsp; I could merge back to the master branch and push to my origin on &lt;a href="http://github.com" target="_blank"&gt;Github.com&lt;/a&gt; and put this up as another task for the Story.&amp;nbsp; For the sake of this post, I&amp;rsquo;m going to add the code here before the merge.&amp;nbsp; Validation and specific business behavior makes me prepare for testing.&amp;nbsp; I do my usual setup (lib folder with NUnit and break the main portion of the console app out to a class library and it&amp;rsquo;s test project).&amp;nbsp; Uh oh, I realized I said &amp;ldquo;No&amp;rdquo; to the prompt to create a whole other folder for the projects.&amp;nbsp; I have the solution file and the console_app project in the same folder.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_172BC670.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_201B58AF.png" border="0" height="303" width="228" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So I move the project files and folders into their own folder and leave the console_app.sln file (and related files) in the current directory.&amp;nbsp; I then change the project references inside the sln file, so that it can still reference the console_app project.&amp;nbsp; Why don&amp;rsquo;t you just move the sln (and related files) up a directory?&amp;nbsp; Unfortunately, the .git folder is at this level.&amp;nbsp; If I move anything above this folder, it will be outside the local git repository.&amp;nbsp; All folder and file moves need to be from this folder and down.&amp;nbsp; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT MV&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I make the moves with the &amp;ldquo;&lt;b&gt;git mv&lt;/b&gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3670FDF4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4A8A1A7D.png" border="0" height="91" width="702" /&gt;&lt;/a&gt;&amp;nbsp; &lt;br /&gt;(yes, to all of the current tortoisegit users, I believe if you select multiple files in windows explorer and move the files, it will do this for you)&lt;/p&gt;
&lt;p&gt;So &amp;ldquo;&lt;b&gt;git mv&lt;/b&gt;&amp;rdquo; takes a list of files, directories, or symlinks (for the *nix users) and will move them to the destination directory listed as the last option.&amp;nbsp; This will do &amp;ldquo;&lt;b&gt;git rename&lt;/b&gt;&amp;rdquo; to all the files and you won&amp;rsquo;t lose any history. (I chose &amp;ldquo;No&amp;rdquo; to the solution/project folder question at the beginning on purpose to show the &amp;ldquo;git mv&amp;rdquo; command here.&amp;nbsp; Sure Jason, sure.)&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT HELP&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;Site Note:&lt;/b&gt; I forgot the arguments for &amp;ldquo;&lt;b&gt;git mv&lt;/b&gt;&amp;rdquo; and therefore typed &amp;ldquo;&lt;b&gt;git help mv&lt;/b&gt;&amp;rdquo; into the Bash GUI:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_73288684.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_6A3B84F6.png" border="0" height="64" width="693" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Unlike on a *nix system, where you&amp;rsquo;ll just get the man page in the console, msysgit will open the web-based git help in your default browser:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6C0BDABD.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_24B9157C.png" border="0" height="502" width="517" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I forgot, &amp;ldquo;&lt;b&gt;git mv&lt;/b&gt;&amp;rdquo; even has a &amp;ldquo;&amp;mdash;dry-run&amp;rdquo; option that will just show you if the move would succeed without errors.&amp;nbsp; Did I mention how much I like git? :)&lt;/p&gt;
&lt;p&gt;After the physical structure change, I manually test the console_app again and it still works:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_311B26D7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_056A5CDB.png" border="0" height="84" width="254" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I am going to commit these changes, so I have a stable place to come back to, just in case (Check-in early and often, right?).&amp;nbsp; I first issue a &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; to see what is in the staging area and what&amp;rsquo;s still in my working directory un-staged:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0F5DF0C5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_53A0E8C2.png" border="0" height="217" width="667" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So, because we used &amp;ldquo;&lt;b&gt;git mv&lt;/b&gt;&amp;rdquo; for the Program.cs, Properties folder, and the console_app.csproj file and they were already being tracked by the repository, they are in the staging area.&amp;nbsp; We had to edit the console_app.sln file to point to the new console_app subfolder.&amp;nbsp; The reason the renames are already in the staging area is because we did not edit their content, just moved them (a git, aka non-human, process).&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I commit the code with &amp;ldquo;&lt;b&gt;git commit &amp;ndash;a &amp;ndash;m &amp;lsquo;restructure application to handle other projects, to allow for testing&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_62D7518F.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4735564A.png" border="0" height="122" width="678" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT LOG&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;We should now have three commits in our log, &amp;ldquo;&lt;b&gt;git log&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_16A1D892.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1F916AD1.png" border="0" height="302" width="692" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now I add my two other projects (library and test) and the lib folder (containing NUnit):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_03833C97.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4589ABD8.png" border="0" height="286" width="250" /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_09CCA3D6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_16C683E7.png" border="0" height="287" width="313" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I then run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_01D79225.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_38B4771C.png" border="0" height="229" width="705" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;GIT ADD&lt;/h2&gt;
&lt;p&gt;Now I run &amp;ldquo;&lt;b&gt;git add&amp;hellip;&lt;/b&gt;&amp;rdquo; for each of the newly untracked items.&amp;nbsp; If I committed right now, those items would not be put into the repository:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_5CDC625C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_57F9AEA0.png" border="0" height="164" width="716" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I run &amp;ldquo;&lt;b&gt;git commit &amp;ndash;a &amp;ndash;m &amp;lsquo;add library and tests projects to solution&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2046F470.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_48E7F128.png" border="0" height="843" width="643" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is a decently sized commit due to the inclusion of lib/nunit.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt; I love the ability to commit to my local repository knowing how I&amp;rsquo;m going to be able to merge to my local master branch as one commit and then push it up to the remote repository (coming soon).&amp;nbsp; Via my lessons learned, as a software developer I sometimes have the tendency to go on a tangent and forget my training as a TDD Padawan.&amp;nbsp; I make too many changes and break a lot more stuff than expected.&amp;nbsp; Ctrl+Z (undo) works most of the time, but to just issue a &amp;ldquo;&lt;b&gt;git reset --hard&lt;/b&gt;&amp;rdquo; and have my current branch reset back to the latest commit, clearing the working directory and staging area is priceless (as mentioned earlier).&lt;/p&gt;
&lt;p&gt;I now write the tests and code for the name validation and run the tests:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_28F18FC0.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_71AB0884.png" border="0" height="245" width="653" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Here are the tests:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_05C6B5BF.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4E168C3F.png" border="0" height="637" width="653" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and code:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_70FC6F51.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_40D5248E.png" border="0" height="271" width="651" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS, GIT ADD, GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; to see the changes, and run &amp;ldquo;&lt;b&gt;git add console_app.library/InvalidNameFormatException.cs&lt;/b&gt;&amp;rdquo;, and &amp;ldquo;&lt;b&gt;git commit &amp;ndash;a &amp;ndash;m &amp;lsquo;add name validation with tests&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_726322D4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_500E1E0C.png" border="0" height="389" width="650" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; one more time verifying all the content is in my local repository.&lt;/p&gt;
&lt;p&gt;Now comes the fun part of merging the changes back to the master branch so that we can push to the remote repository (is there an echo in here? hehe).&amp;nbsp; There are at least three different ways to do this.&amp;nbsp; I&amp;rsquo;m going to cover how I do it and will mention the others in future posts.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT CHECKOUT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I type &amp;ldquo;&lt;b&gt;git checkout master&lt;/b&gt;&amp;rdquo; to switch back to the master branch:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3A46C660.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1C68425F.png" border="0" height="206" width="658" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT BRANCH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I issue the &amp;ldquo;&lt;b&gt;git branch&lt;/b&gt;&amp;rdquo; command again to see that it switched.&amp;nbsp; Again, you don&amp;rsquo;t have to do that because msysgit shows you the current branch you are in in the command prompt (promise, last time I&amp;rsquo;ll say it.&amp;nbsp; Repetition works though. :) ).&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT REMOTE&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I type &amp;ldquo;&lt;b&gt;git remote &amp;ndash;v&lt;/b&gt;&amp;rdquo; to look at the remote repositories that I&amp;rsquo;m watching:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_60AB3A5C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_42CCB65B.png" border="0" height="73" width="665" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;We are monitoring the &lt;a href="mailto:&amp;ldquo;git@github.com:armmer/console_app.git"&gt;&amp;ldquo;git@github.com:armmer/console_app.git&lt;/a&gt;&amp;rdquo; repository and have named it &amp;ldquo;origin&amp;rdquo;.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT PULL&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I type &amp;ldquo;&lt;b&gt;git pull &amp;ndash;-squash . user_prompt&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_728A5EDA.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_23AC2A2C.png" border="0" height="800" width="635" /&gt;&lt;/a&gt;     &lt;br /&gt;&amp;nbsp;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_303EF8AA.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_5CEA4334.png" border="0" height="739" width="642" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Whoa, that&amp;rsquo;s a lot of information.&amp;nbsp; I type &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo; before I do the single (aka squashed) commit to the master branch:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2293EEB5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_6D1DBD40.png" border="0" height="333" width="647" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;hellip; more new file references for nunit are below this.&amp;nbsp; As you can see, everything that we committed in the user_prompt branch is staged in the master branch now (aka &amp;ldquo;Changes to be committed&amp;rdquo;).&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT COMMIT&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I type &amp;ldquo;&lt;b&gt;git commit &amp;ndash;a &amp;ndash;m &amp;lsquo;add name validation with tests&amp;rsquo;&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6C47E807.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_2DE4B505.png" border="0" height="772" width="635" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Everything is now committed on the master branch.&amp;nbsp; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT STATUS&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;As usual, by now you know, I run &amp;ldquo;&lt;b&gt;git status&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1E66C498.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_198410DC.png" border="0" height="84" width="644" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT LOG&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I type &amp;ldquo;&lt;b&gt;git log&lt;/b&gt;&amp;rdquo; on master and I only see two commits:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_102ADC59.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_001E9E53.png" border="0" height="239" width="652" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;That was the point of the squash.&amp;nbsp; So you can do n number of commits in your &amp;ldquo;development&amp;rdquo; branch (in this case user_prompt) and turn it into one commit on master and then push only one commit to your remote repository.&amp;nbsp; That is the power of a distributed source control.&amp;nbsp; Local commits are priceless.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT PUSH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I finally type &amp;ldquo;&lt;b&gt;git push origin master&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_43F5635B.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_018551D6.png" border="0" height="168" width="658" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is the same as the original command we used to push our original commit to the Github.com repository.&amp;nbsp; The command was explained above when we did it the first time.&lt;/p&gt;
&lt;p&gt;And when I go to my &lt;a href="http://github.com" target="_blank"&gt;github.com&lt;/a&gt; page I see the latest commit on the dashboard of the repository (same as the source tab):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_70A0ADE5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3B96AF66.png" border="0" height="164" width="644" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;When I click on the Commits tab, I see both commits, just like when I run &amp;ldquo;git log&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_589F5E2E.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_5A7244A6.png" border="0" height="367" width="644" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;&lt;b&gt;GIT BRANCH&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;The last set of commands I issue are &amp;ldquo;&lt;b&gt;git branch &amp;ndash;D user_prompt&lt;/b&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_2085926B.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_54B9BBB1.png" border="0" height="69" width="654" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and &amp;ldquo;&lt;b&gt;git branch&lt;/b&gt;&amp;rdquo; to make sure it is gone.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_04776431.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_06B3ECED.png" border="0" height="71" width="649" /&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Phew!&amp;nbsp; I know this is a _ton_ of images and information.&amp;nbsp; There are other blogs and tutorials on git that show the commands and that it works, but I&amp;rsquo;ve been wanting to do a more visual blog entry and also give the side notes and insights I&amp;rsquo;ve learned.&lt;/p&gt;
&lt;p&gt;The next post will be on the .git folder and it&amp;rsquo;s magic.&amp;nbsp; Posts after that will consit of concurrent development scenarios, advanced Git commands, and GUI tools.&lt;/p&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;p&gt;Source Code for this post can be found &lt;a href="http://github.com/armmer/console_app/tree/master" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Git+For+Windows+Developers+%e2%80%93+Git+Series+%e2%80%93+Part+2&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f04%2fgit-for-windows-developers-git-series-part-2.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f04%2fgit-for-windows-developers-git-series-part-2.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21501" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=Sh-ptiTeyz8:ZZLgQdXXjBg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=Sh-ptiTeyz8:ZZLgQdXXjBg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=Sh-ptiTeyz8:ZZLgQdXXjBg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=Sh-ptiTeyz8:ZZLgQdXXjBg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=Sh-ptiTeyz8:ZZLgQdXXjBg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=Sh-ptiTeyz8:ZZLgQdXXjBg:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=Sh-ptiTeyz8:ZZLgQdXXjBg:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/windows/default.aspx">windows</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/04/git-for-windows-developers-git-series-part-2.aspx</feedburner:origLink></item><item><title>Git For Windows Developers – Git Series - Part 1</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/JFr4wDdkUO0/git-for-windows-developers-git-series-part-1.aspx</link><pubDate>Mon, 01 Jun 2009 06:04:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21399</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>36</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx#comments</comments><description>&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx"&gt;Git For Windows Developers - Git Series - Part 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/04/git-for-windows-developers-git-series-part-2.aspx"&gt;Git For Windows Developers - Git Series - Part 2&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx"&gt;Git For Windows Developers - Git Series - Part 3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This post is going to be the first of a few. I plan to convey everything I&amp;#39;ve learned the past 8 months while using git on a development team. I&amp;#39;m currently working on a Macbook Pro, doing Ruby on Rails development with git as the source control.&amp;nbsp; These posts will be specific to using git on the Windows operating system.&lt;/p&gt;
&lt;p&gt;This post is going to talk about &lt;a&gt;installing msysgit&lt;/a&gt;, &lt;a&gt;creating ssh keys&lt;/a&gt;, and &lt;a&gt;creating a local git repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you already have msysgit installed, have created your ssh keys, and have an existing application you just want to put in a git repository, go &lt;a&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name="msysgit"&gt;Installing msysgit On Windows&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For windows, install &lt;a href="http://code.google.com/p/msysgit/downloads/list" target="_blank"&gt;msysgit&lt;/a&gt; (both ssh key generation capabilities and git come with this tool): &lt;/p&gt;
&lt;p&gt;Download the latest version of msysgit:    &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0E3B14F1.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_11DBC07F.png" border="0" height="195" width="623" /&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Going through the setup.&amp;nbsp; Click next past the first window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6AA407FA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_2EE6FFF8.png" border="0" height="434" width="555" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Agree to the GPL terms:&amp;nbsp; &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_748E1AC7.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_43FA9D0F.png" border="0" height="432" width="556" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;   &lt;br /&gt;Set the installation location (default was fine for me: C:\Program Files\Git):     &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1E933A52.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7BD20294.png" border="0" height="434" width="559" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;The next screen asks what name the folder that the program will be available from when I click Start-&amp;gt;Programs, etc:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3008BC8C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_381FE8E1.png" border="0" height="442" width="566" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Choose installation options.&amp;nbsp; I don&amp;rsquo;t like to clutter my desktop, so that one is unchecked.&amp;nbsp; The last two options give a user two new options on files when right-clicked in Windows Explorer.&amp;nbsp; &lt;a&gt;We&amp;rsquo;ll talk about this later in the post&lt;/a&gt;.     &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_6C56A2D8.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_297A5E5E.png" border="0" height="443" width="568" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use the &amp;ldquo;Git Bash only&amp;rdquo; option because it&amp;rsquo;s the only reason I downloaded msysgit.&amp;nbsp; The other two options are tightly coupled to the operating system&amp;rsquo;s current setup.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;b&gt;UPDATE&lt;/b&gt;:&amp;nbsp; Via &lt;a target="_blank" title="Joshua Flanagan" href="http://joshuaflanagan.lostechies.com"&gt;Joshua Flanagan&lt;/a&gt;, I was informed that tortoisegit, a tool that will probably become the de facto way to use Git on Windows (we still need msysgit, but tortoisegit will be the UI tool of choice), suggests that you choose the second option &amp;quot;Run Git from the Windows Command Prompt&amp;quot;.&amp;nbsp; I&amp;#39;ve done both, I just prefer the first option because I don&amp;#39;t use tortoisegit.&amp;nbsp; Just be aware.&amp;nbsp; I will mention tortoisegit and how to use it in a future post.&lt;/i&gt;&lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1D7AFEDB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_739A8AA5.png" border="0" height="445" width="567" /&gt;&lt;/a&gt;&lt;br /&gt;     &lt;br /&gt;    &lt;br /&gt;I use OpenSSH.&amp;nbsp; It is the easier of the two to use, in my opinion.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1B632174.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_31B8C6B9.png" border="0" height="442" width="566" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;I like to keep the line endings to the Windows style since that is what I&amp;rsquo;ll be operating on.&amp;nbsp; Interaction with Gthub.com or other operating systems will cause line ending settings to be addressed.&amp;nbsp; Those options will be mentioned in later posts.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_5A59C371.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_254FC4F2.png" border="0" height="448" width="567" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;   &lt;br /&gt;Click next and the installation starts.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_41EED176.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_115B53BE.png" border="0" height="445" width="570" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Uncheck the readme (who reads those anyway?) and click Finish.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0076AFCE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_2BBDD786.png" border="0" height="445" width="570" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once installed, when I click the Windows button and type git (since I&amp;rsquo;m using Windows 7) I&amp;rsquo;ll see &amp;ldquo;Git Bash&amp;rdquo;, &amp;ldquo;Git Gui&amp;#39;&amp;rdquo;, &amp;ldquo;Uninstall Git&amp;rdquo;.&amp;nbsp; Click &amp;ldquo;Git Bash&amp;rdquo;.&amp;nbsp; Once I have the git bash open, I run &amp;ldquo;git &amp;ndash;version&amp;rdquo; to make sure everything is working:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_38BA4848.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_235F2391.png" border="0" height="310" width="597" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I also issue the following commands, &amp;ldquo;git config &amp;ndash;global user.email &lt;a href="mailto:my@email.com"&gt;my@email.com&lt;/a&gt;&amp;rdquo; and &amp;ldquo;git config &amp;ndash;global user.name &amp;lsquo;Jason Meridth&amp;rsquo;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_797EAF5B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3E2DDA4E.png" border="0" height="97" width="606" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;After I commit code in my new repository, &lt;a&gt;later in the post&lt;/a&gt;, we will see why these are relevant.&lt;/p&gt;
&lt;h3&gt;&lt;a name="ssh_keys"&gt;Generating SSH Keys&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve met a good number of Windows developers who don&amp;rsquo;t know what SSH is.&amp;nbsp; My quick definition of Secure Shell (aka SSH): A secure connection mechanism to other networked machines that support SSH, usually over port 22. It is pretty much the default form of remote communication for other platforms. &lt;a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank"&gt;More information if you&amp;#39;re interested&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;History and Retrospective&lt;/i&gt;:     &lt;br /&gt;I used to use cygwin + ssh keys for my git stuff on my windows VMs, but have realized, via advice from a friend, that cygwin will not be the easiest thing to teach to a typical Windows user. I am in no way assuming that any of our readers are &amp;quot;typical&amp;quot; windows users, but he&amp;#39;s right. And msysgit needs to become the defacto Windows git tool anyway. What better way to help that project succeed than to give it more users.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll generate the SSH Keys I will use to need to connect to remote repositories.&amp;nbsp; I issue the following command &amp;ldquo;ssh-keygen &amp;ndash;C &lt;a href="mailto:&amp;lsquo;your@mail.com&amp;rsquo;"&gt;&amp;lsquo;your@mail.com&amp;rsquo;&lt;/a&gt; &amp;ndash;t rsa&amp;rdquo; (using your own email address of course) and then press enter when prompted on file location and return two more times on both passphrase questions:     &lt;br /&gt;    &lt;br /&gt;&amp;nbsp;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_346872D6.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1F0D4E1F.png" border="0" height="312" width="601" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;This will create&amp;nbsp; two files in my /c/Users/jmeridth/.ssh folder.&amp;nbsp; These files are my private and public keys (id_rsa and id_rsa.pub).&amp;nbsp; The public key is the one we will be moving to remote git repository servers in later posts.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;SIDE NOTE&lt;/i&gt;&lt;/b&gt;:&amp;nbsp; back up these keys to a secure location.&amp;nbsp; If they accidentally get corrupted, deleted, or changed you will be able to restore them at any time.&amp;nbsp; I type &amp;ldquo;secure&amp;rdquo; because you need to make sure no one gets a hold of your private key.&amp;nbsp; If either of those situations occur you can just recreate the keys, but every server that already has your public key will need the new public key (kind of a headache and time consuming).&amp;nbsp; I&amp;rsquo;m speaking from experience on this.&lt;/p&gt;
&lt;p&gt;This process will not apply to the remainder of this post, but will for following posts. &lt;/p&gt;
&lt;h3&gt;&lt;a name="first_git_repo"&gt;Putting My Code Under Source Control With Git&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For example&amp;rsquo;s sake, say we have a folder under C:\code.&amp;nbsp; In that folder we&amp;rsquo;ve created a folder called &amp;ldquo;console_app&amp;rdquo;.&amp;nbsp; Inside this folder is a .NET 3.5 Console application that will send &amp;ldquo;hello world&amp;rdquo; to the output.&amp;nbsp; Really?&amp;nbsp; Again? Yep.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_05A7DB96.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4E61545A.png" border="0" height="182" width="164" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The easiest thing that works:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_5E03F01C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_0636292F.png" border="0" height="421" width="671" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I built the application to ensure the bin and obj folders are created.&amp;nbsp; I&amp;rsquo;ll explain why in a minute.&amp;nbsp; In windows explorer I went to the C:\code\ folder.&amp;nbsp; I right-click the console_app folder.&amp;nbsp; Notice &lt;a name="two_new_choices"&gt;the two choices&lt;/a&gt; of &amp;ldquo;Git GUI Here&amp;rdquo; and &amp;ldquo;Git Bash Here&amp;rdquo;.&amp;nbsp; When chosen they will open the corresponding msysgit tools at that desired location.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_27B7E96F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_70716233.png" border="0" height="459" width="275" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Each of these choices shows the two different ways of creating a local git repository or converting an existing folder into a git repository.&amp;nbsp; I will show how to use Git Bash in this post and will use it mainly in this series. (If I get enough response to show Git GUI, I may do that)&lt;/p&gt;
&lt;h4&gt;Turning the Console Application Into A Git Repository With Git Bash&lt;/h4&gt;
&lt;p&gt;Choosing &amp;ldquo;Git Bash Here&amp;rdquo; when right-clicking the C:\code\console_app folder gave me the following:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7726FC67.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_6B250C33.png" border="0" height="132" width="604" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Pretty much what I&amp;rsquo;ve already seen, but notice the path &amp;ldquo;/c/code/console_app&amp;rdquo;.&amp;nbsp; For the individuals who aren&amp;rsquo;t used to a *nix type path structure, that is the same as C:\code\console_app.&lt;/p&gt;
&lt;h4&gt;&lt;a name="commands"&gt;Finally, Git Commands&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In the prompt, type &amp;ldquo;git init&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1A7681BE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_4A342A3D.png" border="0" height="182" width="595" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I just turned my folder into a git repository.&amp;nbsp; Really that easy?&amp;nbsp; Yep.&amp;nbsp; Notice the folder mentioned in the response to the command.&amp;nbsp; The .git folder.&amp;nbsp; For the subversion users who are reading: Remember how you&amp;rsquo;d have a .svn folder under every directory of your repository?&amp;nbsp; Not with git.&amp;nbsp; You only have the one .git folder.&amp;nbsp; If you delete that, you&amp;rsquo;re folder is no longer a git repository.&amp;nbsp; Yes, it&amp;rsquo;s that easy.&lt;/p&gt;
&lt;p&gt;Also, notice the &amp;ldquo;(master)&amp;rdquo; on the end of our prompt.&amp;nbsp; That is a nice feature of msysgit.&amp;nbsp; It is telling me what git branch I&amp;rsquo;m are currently in.&amp;nbsp; We will talk more about that in a future post.&amp;nbsp; I mention it in case anyone notices the new prompt.&lt;/p&gt;
&lt;p&gt;Now issue a &amp;ldquo;git status&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_45540732.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_791BFD83.png" border="0" height="229" width="596" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I will explain this output in a second.&amp;nbsp; I need to create a .gitignore file first.&amp;nbsp; Why?&amp;nbsp; You notice that the bin and obj folders and the _ReSharper files are listed?&amp;nbsp; I don&amp;rsquo;t want to include those items in our repository.&amp;nbsp; Why?&amp;nbsp; Those are items that another developer doesn&amp;rsquo;t need to successfully get the source and compile.&amp;nbsp; They are specific to my local environment.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I tried to create a .gitignore file in Winodws Explorer and kept getting this error:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_4411FF04.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_3AB8CA81.png" border="0" height="213" width="588" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Windows doesn&amp;rsquo;t understand dot files (i.e., .bashrc, .gitignore, etc).&amp;nbsp; Windows expects your files to have a name.extension convention.&lt;/p&gt;
&lt;p&gt;&amp;lt;sarcasm&amp;gt;My love for Windows grows every time I use it&amp;lt;/sarcasm&amp;gt;&lt;/p&gt;
&lt;p&gt;Remember I said I was building the application for a specific reason (aka the bin and obj folders)?&amp;nbsp; It was to highlight the necessity of the .gitignore file and how it can explicitly exclude files from your repository.&amp;nbsp; I go into the Git Bash, at the C:\code\console_app folder.&amp;nbsp; I type &amp;ldquo;ls &amp;ndash;al&amp;rdquo; to list all the files, including dot files.&amp;nbsp; Notice we have .git, but no .gitignore.&amp;nbsp; I type &amp;ldquo;touch .gitignore&amp;rdquo;.&amp;nbsp; This will create the .gitignore file with no content.&amp;nbsp; Issuing &amp;ldquo;ls &amp;ndash;al&amp;rdquo; again and you see the new file.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_1EAA9C47.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_09BBAA85.png" border="0" height="344" width="533" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now I edit the file in vim, my favorite editor, which came with msysgit.&amp;nbsp; I could use any text editor (i.e., notepad, wordpad, notepad++, etc) &lt;/p&gt;
&lt;p&gt;I add the following to it:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_0B225E08.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7F206DD3.png" border="0" height="164" width="139" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I save the file.&lt;/p&gt;
&lt;p&gt;Now I issue a &amp;ldquo;git status&amp;rdquo; again and the bin and obj folders and ReSharper files are not shown.&amp;nbsp; I do now have the .gitignore file listed, but that was expected.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7CE675C8.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7EB6CB8F.png" border="0" height="180" width="592" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Alright.&amp;nbsp; Hopefully you are either saying, &amp;ldquo;yeah, I know, I have to add the files to my staging area, and then commit them to my local repository&amp;rdquo; or &amp;ldquo;what the heck is that?&amp;rdquo;.&amp;nbsp; Maybe even something between like, &amp;ldquo;I know I have to add them to the repository&amp;hellip;.wait, what is a staging area?&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Here is a picture that illustrates what the basic interactions with a local git repository consist of:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_02C3AA13.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_546CB516.png" border="0" height="497" width="540" /&gt;&lt;/a&gt;     &lt;br /&gt;(&lt;a title="http://learn.github.com/images/staging.png" href="http://learn.github.com/images/staging.png"&gt;http://learn.github.com/images/staging.png&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Ignore the &amp;ldquo;checkout the project&amp;rdquo; red arrow.&amp;nbsp; Focus on the &amp;ldquo;stage files&amp;rdquo; and &amp;ldquo;commit&amp;rdquo; red arrows.&amp;nbsp; Those are the actions you need to take to place/update files in your local repository.&amp;nbsp; So, currently, all the files for my console_app application are in my working directory.&amp;nbsp; I need to put them into the staging area before committing them to the local repository.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Common Questions:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Q: Aren&amp;rsquo;t we in a folder already?&amp;nbsp; How does git know what&amp;rsquo;s in and what&amp;rsquo;s not in the local repository?    &lt;br /&gt;A: The .git folder&amp;nbsp; (we will dive deep on that folder in a future blog post)&lt;/p&gt;
&lt;p&gt;Q: What does the staging area give me?    &lt;br /&gt;A: A prepared set of files that you have ready to commit to the local repository.&lt;/p&gt;
&lt;p&gt;So I issue the &amp;ldquo;git add .&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_3C01C31B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_1E47EA6F.png" border="0" height="45" width="577" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;And I issue &amp;ldquo;git status&amp;rdquo; again:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_011EF00D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_79BD4D56.png" border="0" height="245" width="582" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now the files are shown as &amp;ldquo;Changes to be committed&amp;rdquo;.&amp;nbsp; Git even shows me how to remove files from the staging area; &amp;ldquo;git rm &amp;ndash;cached &amp;lt;file&amp;gt;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;I now issue the &amp;ldquo;git commit &amp;ndash;m &amp;lt;message&amp;gt;&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_50041527.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_268FD3E7.png" border="0" height="156" width="573" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The &amp;ldquo;-m&amp;quot; and subsequent text is the message that is assigned to the commit. I see the files get added.&lt;/p&gt;
&lt;p&gt;I now issue the familiar &amp;ldquo;git status&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_7838DEEA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_533B1E71.png" border="0" height="85" width="577" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;ldquo;nothing to commit (working directory clean)&amp;rdquo;.&amp;nbsp; Cool.&amp;nbsp; All of my files are now initialized in the git version control system.&amp;nbsp; How do I see what has been committed to this repository?&amp;nbsp; Good question.&amp;nbsp; Just issue the &amp;ldquo;git log&amp;rdquo; command:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_799F926D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jason_5F00_meridth/image_5F00_thumb_5F00_7B03B53F.png" border="0" height="125" width="583" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a name="config"&gt;Remember those two git config calls we made earlier?&lt;/a&gt;&amp;nbsp; This is where those are relevant.&amp;nbsp; They populated the Author information for the commit.&amp;nbsp; What are those numbers after the commit word?&amp;nbsp; Those are the SHA1 (secure hash algorithm) hash assigned to this commit.&amp;nbsp; SHA1 hashes are &amp;ldquo;unique&amp;rdquo;.&amp;nbsp; Why do I have unique in quotes?&amp;nbsp; Go read &lt;a href="http://en.wikipedia.org/wiki/SHA_hash_functions" target="_blank"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think that is enough for now and if you have any questions, please leave a comment.&amp;nbsp; I will update this post upon necessity.&amp;nbsp; In the next few posts I will be going over the common commands (clone, push, pull, fetch, merge, rebase, remote, branch, etc).&amp;nbsp; I will also show you how to interact with Github.com, a remote git repository via ssh on a LInux box, and Gitosis, a mutli-user and multi-git repository management tool.&amp;nbsp; I will also show how to setup gitweb, an easy to use web-based viewer of your repositories.&amp;nbsp; I will be using the Linux operating system for all the remote servers.&amp;nbsp; The local git commands should be applicable to all platforms once you have git installed correctly.&lt;/p&gt;
&lt;p&gt;I actually have a good portion of the next post already written and will complete it soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Git+For+Windows+Developers+%e2%80%93+Git+Series+-+Part+1&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f01%2fgit-for-windows-developers-git-series-part-1.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f06%2f01%2fgit-for-windows-developers-git-series-part-1.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21399" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=JFr4wDdkUO0:YnH8jX4-pVg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=JFr4wDdkUO0:YnH8jX4-pVg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=JFr4wDdkUO0:YnH8jX4-pVg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=JFr4wDdkUO0:YnH8jX4-pVg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=JFr4wDdkUO0:YnH8jX4-pVg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=JFr4wDdkUO0:YnH8jX4-pVg:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=JFr4wDdkUO0:YnH8jX4-pVg:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/windows/default.aspx">windows</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx</feedburner:origLink></item><item><title>LosTechies welcomes Ryan Svihla</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/cukAxxvTcK8/lostechies-welcomes-ryan-svihla.aspx</link><pubDate>Thu, 21 May 2009 17:07:20 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21144</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>1</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/05/21/lostechies-welcomes-ryan-svihla.aspx#comments</comments><description>&lt;p&gt;We are happy to announce a new member, Ryan Svihla.  Ryan is an active member of the San Antonio software development community.  Ryan regularly attends and contributes to &lt;a href="http://www.alamocoders.net" target="_blank"&gt;AlamoCoders&lt;/a&gt;, &lt;a href="http://groups.google.com/group/san-antonio-tech-book-club" target="_blank"&gt;The San Antonio Tech Book Club&lt;/a&gt;, and &lt;a href="http://saruby.org" target="_blank"&gt;SA Ruby&lt;/a&gt;.  His prior blog writing are at &lt;a href="http://ryansvihla.blogspot.com/" target="_blank"&gt;http://ryansvihla.blogspot.com/&lt;/a&gt;.  If you get a chance, go check it out.&lt;/p&gt;
&lt;p&gt;Ryan is the primary developer on the following 2 OSS projects (among others):&lt;/p&gt;
&lt;a href="http://code.google.com/p/pinsor" target="_blank"&gt;Pinsor (IoC in Python)&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.google.com/p/specmaker/" target="_blank"&gt;SpecMaker (C# BDD Framework)&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;He currently works for a local San Antonio Bank and helped them get their production site to use the Castle stack.  He is very passionate about his craft and we look forward to him helping us contribute to the software development community.&lt;/p&gt;
&lt;p&gt;Welcome to the group Ryan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=LosTechies+welcomes+Ryan+Svihla&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f05%2f21%2flostechies-welcomes-ryan-svihla.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f05%2f21%2flostechies-welcomes-ryan-svihla.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21144" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=cukAxxvTcK8:9rF6KYjdB7I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=cukAxxvTcK8:9rF6KYjdB7I:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=cukAxxvTcK8:9rF6KYjdB7I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=cukAxxvTcK8:9rF6KYjdB7I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=cukAxxvTcK8:9rF6KYjdB7I:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=cukAxxvTcK8:9rF6KYjdB7I:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=cukAxxvTcK8:9rF6KYjdB7I:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/LosTechies/default.aspx">LosTechies</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/members/default.aspx">members</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/05/21/lostechies-welcomes-ryan-svihla.aspx</feedburner:origLink></item><item><title>TextMate and Community Server 2008.5</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/e3iyAcRPF4A/textmate-and-community-server-2008-5.aspx</link><pubDate>Thu, 21 May 2009 08:32:38 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21136</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>4</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/05/21/textmate-and-community-server-2008-5.aspx#comments</comments><description>&lt;p&gt;This is my first blog post from TextMate on my Mac.  I&amp;#39;m using the HTML formatting.  I will try the markdown and textile versions later.  The key to getting this working with Community Server was when you click &amp;quot;Bundles-&amp;gt;Blogging-&amp;gt;Setup Blogs&amp;quot; and the following template shows up:&lt;/p&gt;
&lt;p&gt;
# List of Blogs&lt;br /&gt;
#&lt;br /&gt;
# Enter a blog name followed by the endpoint URL&lt;br /&gt;
#&lt;br /&gt;
# Blog Name      URL&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;you put the following underneath the commented header&lt;/p&gt;
&lt;p&gt;
My Blog Name    http://username@www.mydomain.com/blogs/&amp;lt;api_key&amp;gt;/metablog.ashx#&amp;lt;api_key&amp;gt;	
&lt;/p&gt;
&lt;p&gt;The key part is #&amp;lt;api_key&amp;gt;.  api_key in Community Server terms is the portion of your url after domain/blogs/ and before the page requested.  Mine is jason_meridth.  My full URL for TextMate blogging would be http://myusername_notsharing@www.lostechies.com/blogs/jason_meridth/metablog.ashx#jason_meridth.&lt;/p&gt;
&lt;p&gt;Hope this may help a fellow Mac brethren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=TextMate+and+Community+Server+2008.5&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f05%2f21%2ftextmate-and-community-server-2008-5.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f05%2f21%2ftextmate-and-community-server-2008-5.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21136" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=e3iyAcRPF4A:qbeAT3i0now:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=e3iyAcRPF4A:qbeAT3i0now:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=e3iyAcRPF4A:qbeAT3i0now:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=e3iyAcRPF4A:qbeAT3i0now:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=e3iyAcRPF4A:qbeAT3i0now:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=e3iyAcRPF4A:qbeAT3i0now:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=e3iyAcRPF4A:qbeAT3i0now:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/textmate/default.aspx">textmate</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/blogging/default.aspx">blogging</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/05/21/textmate-and-community-server-2008-5.aspx</feedburner:origLink></item><item><title>San Antonio community</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/pnTaetFwRHk/san-antonio-community.aspx</link><pubDate>Tue, 21 Apr 2009 14:53:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20413</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/04/21/san-antonio-community.aspx#comments</comments><description>&lt;p&gt;This list is for any developers in the San Antonio, TX area.&amp;nbsp; These are the communities that are growing/starting that I&amp;#39;ve been involved (member/leader).&amp;nbsp; If anyone knows of others please leave a comment and I&amp;#39;ll update the post.&amp;nbsp; (Man we love our Tuesdays in San Antonio, every Tuesday is a group meeting)&lt;/p&gt;
&lt;h3&gt;Alamo Coders (organizer &lt;a target="_blank" href="http://www.twitter.com/pjdennis"&gt;Phil Dennis&lt;/a&gt;)&lt;/h3&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.alamocoders.net"&gt;http://www.alamocoders.net&lt;/a&gt;&lt;/p&gt;
&lt;div id="dnn_ctr369_HtmlModule_HtmlModule_lblContent" class="Normal"&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Welcome to&amp;nbsp;&lt;b&gt;&lt;span style="color:#330066;"&gt;&lt;span style="color:#000000;"&gt;Alamo Coders&lt;/span&gt;.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;We
are a FREE San Antonio area IT professionals Users Group that focus on
the tools, technologies, and programming languages that help a software
developer/architect/manager in today&amp;#39;s industry. If would like to learn
more about software development or the tools that are involved in that
process, or if you just want to learn more about what&amp;nbsp;&lt;b&gt;Alamo Coders&lt;/b&gt;&amp;nbsp;has to offer the San Antonio area IT community, then please join our group.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;To get AlamoCoders Apparel, please go to our &lt;a href="http://www.cafepress.com/alamocoders"&gt;CafePress store.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;MEETINGS: 2nd TUESDAY OF EVERY MONTH (@ New Horizons)&lt;br /&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;San Antonio Tech Book Club (organizer &lt;a target="_blank" href="http://ajepst.devlicio.us"&gt;Anne Epstein&lt;/a&gt;)&lt;/h3&gt;
&lt;p&gt;&lt;a target="_blank" href="http://groups.google.com/group/san-antonio-tech-book-club"&gt;http://groups.google.com/group/san-antonio-tech-book-club&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Our next meeting:&lt;br /&gt;Where: Skype&lt;br /&gt;When: 4/21/2009 (Tuesday) at 7pm&lt;br /&gt;Current Book:&amp;nbsp; &lt;a href="http://www.amazon.com/Implementing-Lean-Software-Development-Addison-Wesley/dp/0321437381/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1238469804&amp;amp;sr=8-1" rel="nofollow"&gt;Implementing Lean Software Development: From Concept to Cash&lt;/a&gt;&lt;br /&gt;Topic: Chapters 1 &amp;amp; 2&lt;br /&gt;&lt;br /&gt;NOTE: On 5/5/2009 we&amp;#39;ll be going back to our other book, &lt;a href="http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215" rel="nofollow"&gt;Domain Driven Design by Eric Evans&lt;/a&gt;&lt;br /&gt;and switching off between the books. Following meeting will be back to Lean, meeting after that will be DDD again, etc.&lt;/p&gt;
&lt;h2&gt;MEETINGS: 1st &amp;amp; 3rd TUESDAY OF EVERY MONTH (Skype)&lt;br /&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.google.com/calendar/embed?src=70v8r23jvv11h8g84sktkehfsg%40group.calendar.google.com&amp;amp;ctz=America/Chicago" rel="nofollow"&gt;Google Calendar&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;SARuby (organizer TBD)&lt;/h3&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.saruby.org"&gt;http://www.saruby.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is now a SARuby group in San Antonio.&amp;nbsp; This month&amp;#39;s meeting is Tuesday, April 28 @ 6:30 pm.&amp;nbsp; It is at Anderson Marketing Group (Thanks to &lt;a target="_blank" href="http://pixelnate.com/"&gt;Nate&lt;/a&gt; for providing the location).&amp;nbsp; Map&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;: &lt;a target="_blank" rel="nofollow" href="http://tinyurl.com/ckl43y"&gt;http://tinyurl.com/ckl43y&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;MEETINGS: LAST TUESDAY OF EVERY MONTH (@ Anderson Marketing)&lt;br /&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://groups.google.com/group/saruby/browse_thread/thread/c68606112c00e79"&gt;More detailed meeting information&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=San+Antonio+community&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f04%2f21%2fsan-antonio-community.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f04%2f21%2fsan-antonio-community.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20413" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=pnTaetFwRHk:_GmXQqhQNPA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=pnTaetFwRHk:_GmXQqhQNPA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=pnTaetFwRHk:_GmXQqhQNPA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=pnTaetFwRHk:_GmXQqhQNPA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=pnTaetFwRHk:_GmXQqhQNPA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=pnTaetFwRHk:_GmXQqhQNPA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=pnTaetFwRHk:_GmXQqhQNPA:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/san+antonio/default.aspx">san antonio</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/community/default.aspx">community</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/04/21/san-antonio-community.aspx</feedburner:origLink></item><item><title>LosTechies welcomes James Gregory</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/ybMv1DayyFY/lostechies-welcomes-james-gregory.aspx</link><pubDate>Fri, 27 Mar 2009 14:21:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20049</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>5</slash:comments><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/03/27/lostechies-welcomes-james-gregory.aspx#comments</comments><description>&lt;p&gt;We are happy to announce a new member, James Gregory.&amp;nbsp; If you&amp;#39;re in the NHibernate world you&amp;#39;ll recognize him as the lead developer on the Fluent NHibernate project.&amp;nbsp; He recently took on the Docu project for .NET documentation and is working with a few other projects.&amp;nbsp; His home page sums up his information perfectly.&amp;nbsp; James is definitely a pragmatic programmer and is a perfect fit for us.&amp;nbsp; Here are some of James&amp;#39; links.&lt;/p&gt;
&lt;p&gt;His LosTechies blog is located at &lt;a target="_self" href="http://jagregory.lostechies.com"&gt;http://jagregory.lostechies.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;Homepage: &lt;a target="_blank" rel="nofollow" href="http://jagregory.com/"&gt;http://jagregory.com&lt;/a&gt; &lt;br /&gt; Blog: &lt;a target="_blank" rel="nofollow" href="http://blog.jagregory.com/"&gt;http://blog.jagregory.com&lt;/a&gt; &lt;br /&gt; Twitter: &lt;a target="_blank" rel="nofollow" href="http://twitter.com/jagregory"&gt;http://twitter.com/jagregory&lt;/a&gt; &lt;br /&gt; Github Repos: &lt;a target="_blank" rel="nofollow" href="http://github.com/jagregory"&gt;http://github.com/jagregory&lt;/a&gt; &lt;br /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;OSS Projects&lt;br /&gt; Docu: &lt;a target="_blank" rel="nofollow" href="http://docu.jagregory.com/"&gt;http://docu.jagregory.com&lt;/a&gt; &lt;br /&gt; FluentNHibernate: &lt;a target="_blank" rel="nofollow" href="http://fluentnhibernate.org/"&gt;http://fluentnhibernate.org/&lt;/a&gt; &lt;br /&gt; BooLangStudio: &lt;a target="_blank" rel="nofollow" href="http://www.codeplex.com/BooLangStudio"&gt;http://www.codeplex.com/BooLangStudio&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Welcome to the group James.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=LosTechies+welcomes+James+Gregory&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f27%2flostechies-welcomes-james-gregory.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f27%2flostechies-welcomes-james-gregory.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20049" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=ybMv1DayyFY:f4_S6Nynq6o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=ybMv1DayyFY:f4_S6Nynq6o:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=ybMv1DayyFY:f4_S6Nynq6o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=ybMv1DayyFY:f4_S6Nynq6o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=ybMv1DayyFY:f4_S6Nynq6o:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=ybMv1DayyFY:f4_S6Nynq6o:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=ybMv1DayyFY:f4_S6Nynq6o:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/03/27/lostechies-welcomes-james-gregory.aspx</feedburner:origLink></item><item><title>Adding a git post-receive hook to fire off Hudson CI server</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/w6q_Yls-0Gg/adding-a-git-post-receive-hook-to-fire-off-hudson-ci-server.aspx</link><pubDate>Tue, 24 Mar 2009 18:07:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:19999</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;UPDATE:  guard clause throws LocalJumpError.  Changed to simple if block&lt;/span&gt;&lt;/span&gt;
Context:  I needed our hudson CI builds to auto-fire when a developer pushes their code changes to our canonical/upstream git repositories.
In your .git/hooks/post-receive file place the file code (FULL CODE):&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;#!/usr/bin/env ruby
#   
while (input = STDIN.read) != &amp;#39;&amp;#39;
   rev_old, rev_new, ref = input.split(&amp;quot; &amp;quot;)
   if ref == &amp;quot;refs/heads/master&amp;quot;

       url=&amp;quot;http://yourhudsondomain.com/job/job_name_here/build?delay=0sec&amp;quot;

       puts &amp;quot;Run Hudson build for job_name_here application&amp;quot;
       `wget #{url} &amp;gt; /dev/null 2&amp;gt;&amp;amp;1`
   end
end
&lt;/pre&gt;
&lt;p&gt;
EXPLAINING EACH LINE:
I avoid writing bash scripts in default bash if I can.  This is for a Ruby on Rails app, so I decided to write it in Ruby. &lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;#!/usr/bin/env ruby
&lt;/pre&gt;
&lt;p&gt;
The while loop checks to make sure there are values in STDIN (by default they are rev_old, rev_new, and ref).&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;#   
while (input = STDIN.read) != &amp;#39;&amp;#39;
end
&lt;/pre&gt;
&lt;p&gt;
I put an if statement block:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;if ref == &amp;quot;refs/heads/master&amp;quot;
end
&lt;/pre&gt;
&lt;p&gt;
to make sure I only fire the build if it is the master branch.
Set the URL for the app you want to build:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;url=&amp;quot;http://yourhudsondomain.com/job/job_name_here/build?delay=0sec&amp;quot;
&lt;/pre&gt;
&lt;p&gt;
Add a little text to notify the user what is going on (always a good idea):&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;puts &amp;quot;Run Hudson build for job_name_here application&amp;quot;
&lt;/pre&gt;
&lt;p&gt;
And finally all the url with wget and feeding any response to &lt;a href="http://www.xaprb.com/blog/2006/06/06/what-does-devnull-21-mean/" target="_blank"&gt;the black hole that is /dev/null&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;`wget #{url} &amp;gt; /dev/null 2&amp;gt;&amp;amp;1`
&lt;/pre&gt;
&lt;p&gt;
IMPORTANT:
Don&amp;#39;t forget to run:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;chmod a+x .git/hooks/post-receive
&lt;/pre&gt;
&lt;p&gt; so that the file can be run
Some Gotchas:
1. If you are going to a url that has http basic authentication like my actual script does, you can pass the username and password like you normally would in an HTTP call:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;url=&amp;quot;http://username:password@yourhudsondomain.com/job/job_name_here/build?delay=0sec&amp;quot;
&lt;/pre&gt;
&lt;p&gt;
2. If you are doing an https call with a self-signed certificate, wget will complain.  You can add the &lt;a href="http://www.gnu.org/software/wget/manual/html_node/HTTPS-_0028SSL_002fTLS_0029-Options.html" target="_blank"&gt;--no-check-certificate&lt;/a&gt; argument to wget to bypass certificate validation against local certificate caches:&lt;/p&gt;
&lt;pre name="code" class="ruby"&gt;`wget --no-check-certificate #{url} &amp;gt; /dev/null 2&amp;gt;&amp;amp;1`
&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Adding+a+git+post-receive+hook+to+fire+off+Hudson+CI+server&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f24%2fadding-a-git-post-receive-hook-to-fire-off-hudson-ci-server.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f24%2fadding-a-git-post-receive-hook-to-fire-off-hudson-ci-server.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=19999" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=w6q_Yls-0Gg:GDF-gUh9bdY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=w6q_Yls-0Gg:GDF-gUh9bdY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=w6q_Yls-0Gg:GDF-gUh9bdY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=w6q_Yls-0Gg:GDF-gUh9bdY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=w6q_Yls-0Gg:GDF-gUh9bdY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=w6q_Yls-0Gg:GDF-gUh9bdY:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=w6q_Yls-0Gg:GDF-gUh9bdY:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/git/default.aspx">git</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/hudson/default.aspx">hudson</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/continous+integration/default.aspx">continous integration</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/03/24/adding-a-git-post-receive-hook-to-fire-off-hudson-ci-server.aspx</feedburner:origLink></item></channel></rss>
