<?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" /><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>9</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=21604</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=21604</wfw:comment><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>25</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=21501</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=21501</wfw:comment><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&amp;#39;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 oririn&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;quot;?&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&amp;#39; 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>21</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=21399</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=21399</wfw:comment><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><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=21144</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=21144</wfw:comment><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><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=21136</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=21136</wfw:comment><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><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=20413</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=20413</wfw:comment><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><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=20049</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=20049</wfw:comment><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><item><title>LosTechies welcomes Eric Anderson</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/0BdLFK8Y0KA/lostechies-welcomes-eric-anderson.aspx</link><pubDate>Wed, 11 Mar 2009 15:37:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:19809</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=19809</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=19809</wfw:comment><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/03/11/lostechies-welcomes-eric-anderson.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;LosTechies is proud to welcome Eric Anderson.&amp;nbsp; Eric is another Austinite that has been a great community contributor and has been very passionate about software best practices and continuous learning.&amp;nbsp; His blog (&lt;a target="_blank" rel="nofollow" href="http://testinfected.blogspot.com/"&gt;http://testinfected.blogspot.com/)&lt;/a&gt; even has the testinfected subdomain, as ensuring that your code is properly tested is undoubtedly a passion of his.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Eric is also the primary developer on EasySpec, a BDD specification framework written in Groovy.&lt;br /&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;&lt;a target="_blank" rel="nofollow" href="http://code.google.com/p/easyspec/"&gt;http://code.google.com/p/easyspec/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;His Hudson Server for EasySpec: &lt;/span&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt; &lt;a target="_blank" rel="nofollow" href="http://testinfected.dyndns.org/hudson/"&gt;http://testinfected.dyndns.org/hudson/&lt;/a&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:Courier,Monospaced;" class="fixed_width"&gt;I&amp;#39;ve had the privilege of meeting Eric on a number of occasions and am glad he has accepted our invitation to follow Pablo and help our community.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;His new blog is located at &lt;a target="_blank" href="http://eric.lostechies.com"&gt;http://eric.lostechies.com&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=LosTechies+welcomes+Eric+Anderson&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f11%2flostechies-welcomes-eric-anderson.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%2f11%2flostechies-welcomes-eric-anderson.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=19809" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0BdLFK8Y0KA:IhOTIBrV2p4: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=0BdLFK8Y0KA:IhOTIBrV2p4: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=0BdLFK8Y0KA:IhOTIBrV2p4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=0BdLFK8Y0KA:IhOTIBrV2p4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=0BdLFK8Y0KA:IhOTIBrV2p4: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=0BdLFK8Y0KA:IhOTIBrV2p4:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=0BdLFK8Y0KA:IhOTIBrV2p4: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/03/11/lostechies-welcomes-eric-anderson.aspx</feedburner:origLink></item><item><title>Firefox Hudson Build Monitor add-on</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/sUG3KE--rnA/firefox-hudson-build-monitor-add-on.aspx</link><pubDate>Thu, 05 Mar 2009 02:19:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:19621</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span style="font-weight:bold;"&gt;MOZILLA: READ THIS!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To Mozilla,&lt;br /&gt;You
should upgrad ethe Hudson Build Monitor Plugin so that users don&amp;#39;t have
to create add-on accounts just to download. Cliffano&amp;#39;s customer support
and product are top of the line.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;I have
started using Hudson as my Continous Integraton server at work and
still setting it up for custom interaction with Git. I have used
CruiseControl.NET and TeamCity extensively in the past and both have
tray tools. Well, I found &lt;a href="http://hudsontracker.sourceforge.net/index.html"&gt;HudsonTracker&lt;/a&gt;, but it wouldn&amp;#39;t work for me because I&amp;#39;m using Basic HTTP Auth with my Hudson instance.&lt;br /&gt;&lt;br /&gt;I then found the &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/7522"&gt;Firefox Hudson Build Monitor plugin&lt;/a&gt;, written by Cliffano Subagio (&lt;a href="https://addons.mozilla.org/en-US/firefox/user/1635724"&gt;firefox developer account&lt;/a&gt; and &lt;a href="http://blog.qoqoa.com/"&gt;blog&lt;/a&gt;), but again, same problem.  I decided to issue a ticket with the Firefox plugin.&lt;br /&gt;&lt;br /&gt;Within a short time (couple of days), Cliffano responded with a new version to test the HTTP Authentication against.&lt;br /&gt;&lt;br /&gt;I
uninstalled the old version just to make sure of no conflict and then I
right-clicked the xpi file and said to open with Firefox. It installed
without issue and showed the butler in the firefox status bar:&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa8xHmBvNiI/AAAAAAAAAVo/QFVU2GlXFQY/s1600-h/Picture+1.png"&gt;&lt;img style="margin:0pt 10px 10px 0pt;float:left;cursor:pointer;width:27px;height:21px;" src="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa8xHmBvNiI/AAAAAAAAAVo/QFVU2GlXFQY/s400/Picture+1.png" id="BLOGGER_PHOTO_ID_5309516492229785122" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can right-click him and get the preferences menu:&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_JmjHpHPB6hg/Sa8xYNYfkLI/AAAAAAAAAVw/gGM5FF9cVc4/s1600-h/Picture+2.png"&gt;&lt;img style="margin:0pt 10px 10px 0pt;float:left;cursor:pointer;width:145px;height:51px;" src="http://1.bp.blogspot.com/_JmjHpHPB6hg/Sa8xYNYfkLI/AAAAAAAAAVw/gGM5FF9cVc4/s400/Picture+2.png" id="BLOGGER_PHOTO_ID_5309516777672118450" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are 5 tabs:&lt;br /&gt;1.Feeds - where you put your RSS feed URL to your hudson dashboard&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa80ldoctAI/AAAAAAAAAWo/fQcS3zyux5c/s1600-h/Picture+3a.png"&gt;&lt;img style="cursor:pointer;width:400px;height:156px;" src="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa80ldoctAI/AAAAAAAAAWo/fQcS3zyux5c/s400/Picture+3a.png" id="BLOGGER_PHOTO_ID_5309520303907189762" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2.
Display - designate some UI elements (# of builds, what to show on
status bar when collapsed, color indicators [Hudson uses blue for
successful builds for some reason. Can choose green here for us
Red/Green guys/gals], etc)&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_JmjHpHPB6hg/Sa8yfDnGlTI/AAAAAAAAAWA/xEVhtl_-Hx8/s1600-h/Picture+4.png"&gt;&lt;img style="cursor:pointer;width:400px;height:155px;" src="http://4.bp.blogspot.com/_JmjHpHPB6hg/Sa8yfDnGlTI/AAAAAAAAAWA/xEVhtl_-Hx8/s400/Picture+4.png" id="BLOGGER_PHOTO_ID_5309517994819753266" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Notification - designate how you will be notified of certain events&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8y12XpL5I/AAAAAAAAAWI/j8_JAQcRsAc/s1600-h/Picture+5.png"&gt;&lt;img style="cursor:pointer;width:400px;height:155px;" src="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8y12XpL5I/AAAAAAAAAWI/j8_JAQcRsAc/s400/Picture+5.png" id="BLOGGER_PHOTO_ID_5309518386402242450" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. Network - username and password for HTTP Authentication&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8y8ZCnBVI/AAAAAAAAAWQ/LelGDXM1YL4/s1600-h/Picture+6.png"&gt;&lt;img style="cursor:pointer;width:400px;height:154px;" src="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8y8ZCnBVI/AAAAAAAAAWQ/LelGDXM1YL4/s400/Picture+6.png" id="BLOGGER_PHOTO_ID_5309518498788476242" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. Misc - designate how to open page (new tab, new firefox window) and enable debugging&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_JmjHpHPB6hg/Sa8y_Z_xVbI/AAAAAAAAAWY/rDWngSl9y5U/s1600-h/Picture+7.png"&gt;&lt;img style="cursor:pointer;width:400px;height:155px;" src="http://4.bp.blogspot.com/_JmjHpHPB6hg/Sa8y_Z_xVbI/AAAAAAAAAWY/rDWngSl9y5U/s400/Picture+7.png" id="BLOGGER_PHOTO_ID_5309518550584612274" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NOTE:
Whenever I added my RSS feed from my Hudson dashboard to the tool (I&amp;#39;m
using Firefox on a Mac) the URL would not stay. Cliffano had a solution
for this:&lt;br /&gt;1. Go to your Hudson dashboard&lt;br /&gt;&lt;br /&gt;2. Right click your RSS feed of choice (I prefer &amp;quot;for all&amp;quot; which is https://hudson.mydomain.com/rssAll):&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8zrDEwJKI/AAAAAAAAAWg/O7a_KGnm0Hk/s1600-h/Picture+8.png"&gt;&lt;img style="cursor:pointer;width:351px;height:30px;" src="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8zrDEwJKI/AAAAAAAAAWg/O7a_KGnm0Hk/s400/Picture+8.png" id="BLOGGER_PHOTO_ID_5309519300345734306" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Choose &amp;quot;Add Link To Hudson Build Monitor&amp;quot;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa805kAncpI/AAAAAAAAAWw/QTkVBsYGdJM/s1600-h/Picture+10.png"&gt;&lt;img style="cursor:pointer;width:346px;height:198px;" src="http://3.bp.blogspot.com/_JmjHpHPB6hg/Sa805kAncpI/AAAAAAAAAWw/QTkVBsYGdJM/s400/Picture+10.png" id="BLOGGER_PHOTO_ID_5309520649216553618" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. Name the URL:&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8141ClQGI/AAAAAAAAAW4/1EfpczqZQ5g/s1600-h/Picture+11a.png"&gt;&lt;img style="cursor:pointer;width:276px;height:112px;" src="http://2.bp.blogspot.com/_JmjHpHPB6hg/Sa8141ClQGI/AAAAAAAAAW4/1EfpczqZQ5g/s400/Picture+11a.png" id="BLOGGER_PHOTO_ID_5309521736119959650" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And
VOILA! it stayed in my preferences. Most users won&amp;#39;t have to go this
route, but instead of typing out the url and just a name, it is easier.&lt;br /&gt;&lt;br /&gt;Thank you Cliffano.  Hopefully Mozilla will upgrade the plugin and stop requiring people to create accounts to download it.&lt;br /&gt;&lt;br /&gt;Cliffano has stated that a 1.0 version will be coming soon.  Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Firefox+Hudson+Build+Monitor+add-on&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f03%2f04%2ffirefox-hudson-build-monitor-add-on.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%2f04%2ffirefox-hudson-build-monitor-add-on.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=19621" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=sUG3KE--rnA:EJLFu-QXGEA: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=sUG3KE--rnA:EJLFu-QXGEA: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=sUG3KE--rnA:EJLFu-QXGEA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=sUG3KE--rnA:EJLFu-QXGEA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/jasonmeridth?a=sUG3KE--rnA:EJLFu-QXGEA: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=sUG3KE--rnA:EJLFu-QXGEA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/jasonmeridth?i=sUG3KE--rnA:EJLFu-QXGEA: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/firefox/default.aspx">firefox</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/04/firefox-hudson-build-monitor-add-on.aspx</feedburner:origLink></item><item><title>Design Patterns in Ruby by Russ Olsen</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/05Zgq4LyRFQ/design-patterns-in-ruby-by-russ-olsen.aspx</link><pubDate>Thu, 26 Feb 2009 04:29:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:19088</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;&lt;a href="http://www.informit.com/ShowCover.aspx?isbn=0321539265&amp;amp;type=f"&gt;&lt;img style="margin:0pt 10px 10px 0pt;float:left;cursor:pointer;width:160px;height:212px;" src="http://www.informit.com/ShowCover.aspx?isbn=0321539265&amp;amp;type=f" border="0" alt="" /&gt;&lt;/a&gt;
After nudging by &lt;a href="http://agilejoe.lostechies.com/"&gt;Joe Ocampo&lt;/a&gt; and &lt;a href="http://www.ampgt.com/"&gt;Scott Bellware&lt;/a&gt;, I finally sat down at finished &amp;quot;Design Patterns in Ruby&amp;quot; by Russ Olsen.
The format of most of the chapters made the book an interesting read:
1. A introduction to why you might need the pattern
2. A static language developer&amp;#39;s approach with the Ruby language
3. A seasoned Ruby developer&amp;#39;s approach to the design pattern
4. Using and Abusing 
5.  in the wild
6. Wrapping up
Some of the items that I learned [LosTechies is not a cult contrary to some of the examples you read below; some of the examples below are using LosTechies nomenclature but closely resemble what the author had in the book]
If any of the stuff below intrigues you:  GO BUY THE BOOK.  You won&amp;#39;t regret it.  Even if you are trying to understand patterns in another language.  Russ Olsen does an excellent job explaining the INTENT of the patterns.
FUN
When teaching the reader about &amp;quot;Truth, Lies, and nil&amp;quot;, the author even pokes fun at himself:&lt;textarea name="code" class="ruby"&gt;&amp;#39;russ&amp;#39; == &amp;#39;smart&amp;#39;    # sadly, false
&lt;/textarea&gt;
&lt;hr /&gt;
BOOLEAN
In Ruby, zero, being neither &lt;span style="font-style:italic;"&gt;false&lt;/span&gt; nor &lt;span style="font-style:italic;"&gt;nil&lt;/span&gt;, evaluates to true in Boolean expression.&lt;textarea name="code" class="ruby"&gt;if 0
 puts(&amp;#39;Zero is true!&amp;#39;)
end
&lt;/textarea&gt;
will print out: &lt;span style="font-weight:bold;"&gt;Zero is true!&lt;/span&gt;
&lt;hr /&gt;
ARRAYS
Points for matrix reference in array examples
&lt;textarea name="code" class="ruby"&gt;x = []
y = Array.new
a = [&amp;#39;neo&amp;#39;, &amp;#39;trinity&amp;#39;, &amp;#39;tank&amp;#39;]
&lt;/textarea&gt;
&lt;hr /&gt;
REGULAR EXPRESSIONS
The flow of the language when creating regular expressions:
&lt;textarea name="code" class="ruby"&gt;/old/ =~ &amp;#39;this old house&amp;#39;     # 5 - the index of &amp;#39;old&amp;#39;
/Russ|Russell/ =~ &amp;#39;Fred&amp;#39;      # nil - Fred is not Russ nor Russell
/.*/ =~ &amp;#39;any old string&amp;#39;      # 0 - the RE will match anything
&lt;/textarea&gt;
&lt;hr /&gt;
ARBITRARY PARAMETERS
Any author that uses DC comic character to explain arbitrary numbers of arguments, is a winner in my mind:&lt;textarea name="code" class="ruby"&gt;def describe_hero(name, *super_powers&amp;gt;
 puts(&amp;quot;Name: #{name}&amp;quot;)
 for power in super_powers
     puts(&amp;quot;Super power: #{power}&amp;quot;)
 end
end
describe_hero(&amp;quot;Batman&amp;quot;)
describe_hero(&amp;quot;Flash&amp;quot;, &amp;quot;speed&amp;quot;)
describe_hero(&amp;quot;Superman&amp;quot;, &amp;quot;can fly&amp;quot;, &amp;quot;x-ray vision&amp;quot;, &amp;quot;invulnerable&amp;quot;)   # w00t!
&lt;/textarea&gt;
&lt;hr /&gt;
DUCK TYPING AND UNIT TESTS
He mentions duck typing and the fact that &amp;quot;Unit Tests Are Not Optional&amp;quot; is a section heading when teaching the Template Method Pattern.
&lt;hr /&gt;
PROCS AND BLOCKS
&lt;textarea name="code" class="ruby"&gt;# using the do/end notation
hello = lambda do
 puts(&amp;#39;Hello&amp;#39;)
 puts(&amp;#39;I am a follower of Pablo&amp;#39;)
end
#you may use curly braces instead of do/end
hello = lambda {
 puts(&amp;#39;Hello, I am a follower of Pablo&amp;#39;)
}
#the preferred way to use curly braces
hello = lambda {puts(&amp;#39;Hello, I am a follower of Pablo&amp;#39;)}
&lt;/textarea&gt;
&lt;hr /&gt;
STRATEGY PATTERN
using proc-based formatters to create a ruby-based strategy pattern
&lt;textarea name="code" class="ruby"&gt;class Report
 attr_reader :title, :text
 attr_accessor :formatter
 def initialize(&amp;amp;formatter)
   @title = &amp;#39;Monthly Report&amp;#39;
   @text = [&amp;#39;Things are going&amp;#39;, &amp;#39;really, really well.&amp;#39; ]
   @formatter = formatter
 end
 def output_report
   @formatter.call( self )
 end
end

HTML_FORMATTER = lambda do |context|
...code to output HTML
report = Report.new &amp;amp;HTML_FORMATTER
report.output_report
&lt;/textarea&gt;
You could create any type of formatter you want in a proc instead creating new classes.
&lt;hr /&gt;
OBSERVER PATTERN
Modules exist that encapsulate things that some of us static developers might already be used to:&lt;textarea name="code" class="ruby"&gt;require &amp;#39;observer&amp;#39;
class Employee
include Observable
attr_reader :name, :address
attr_reader :salary
def initialize( name, title, salary)
 @name = name
 @title = title
 @salary = salary
end
def salary=(new_salary)
 @salary = new_salary
 changed
 notify_observers(self)
end
end
&lt;/textarea&gt;
&lt;hr /&gt;
ITERATOR PATTERN
Internal Iterators versus External Iterators: (had never heard it put this way)
External iterator - client drives the iteration...you won&amp;#39;t call next until you are good and ready for the next element
Internal iterator - the aggregate relentlessly pushes the code block to accept item after item.
&lt;hr /&gt;
COMMAND PATTERN
The Command pattern translates very smoothly into code blocks.  Here is a PabloForPresidentButton class reworked to use code blocks:&lt;textarea name="code" class="ruby"&gt;class PabloForPresidentButton
attr_accessor :command
def initialize(&amp;amp;block)
 @command = block
end
#
# Lots of button drawing and management
# code omitted ...
#
def on_button_push
 @command.call if @command
end
end

new_button = PabloForPresidentButton.new do
#
# Make a developer stop looking so nerdy
# by placing one over his pocket protector
#
end
&lt;/textarea&gt;
The author does not diminish the needs for classes.  For straightforward actions, use a Proc object.  For complex object or objects that will carry around a lot of state, create a command class.
&lt;hr /&gt;
ADAPTER PATTERN
Instead of adhering to some interface and trying to create your adapter, why not just extend the original class.
&lt;textarea name="code" class="ruby"&gt;# load original class
require &amp;#39;lostechies_text_object&amp;#39;
# now add some methods to original class
class LosTechiesTextObject
def sponsor
 return friend_of_pablo
end
def blogger
 return follower_of_pablo
end
end
&lt;/textarea&gt;
Before any of you Open-Closed people attack, please re-read the definition of OCP - Open for extension, closed for modification.  Doesn&amp;#39;t this adhere to that?  :)
&lt;hr /&gt;
PROXY PATTERN
There are three tyes of Proxies:  The Protection Proxy, Remote Proxy, Virtual Proxy
These are mentioned in the Gang of Four book.  He introduces a Ruby-esqe way to approach proxies:  the method_missing Method
&lt;textarea name="code" class="ruby"&gt;class AccountProxy
def initialize(real_account)
 @subject = real_account
end
def method_missing(name, *args)
 puts(&amp;quot;Delegating #{name} message to subject.&amp;quot;)
 @subject.send(name, *args)
end
end
ap = AccountProxy.new( BankAccount.new(100) )
ap.deposit(25)
ap.withdraw(50)
puts(&amp;quot;account balance is now: #{ap.balance}&amp;quot;)
&lt;/textarea&gt;
Will output:
delegating deposit method to subject.
delegating withdraw method to subject.
delegating balance method to subject.
account balance is now: 75
&lt;hr /&gt;
DECORATOR PATTERN
&lt;textarea name="code" class="ruby"&gt;module Decorator1
def do_something(common_item_to_decorate)
 #code
end
end
module Decorator2
def do_something(common_item_to_decorate)
 #code
end
end
d = SimpleItem.new()
d.extend(Decorator1)
d.extend(Decorator2)
e.do_something(&amp;#39;howdy&amp;#39;)
&lt;/textarea&gt;
&lt;hr /&gt;
SINGLETON PATTERN
The author admits the career of the singleton has been checkered, but still shows that you can use it in the Ruby world.  An example he gives us to allow testing of singleton implementation code is to put the implementation code in a base class and have the child be the singleton:
&lt;textarea name="code" class="ruby"&gt;require &amp;#39;singleton&amp;#39;
class SimpleLogger
#  All of the logging functionality in this class...
#  Test this code
end
class SingletonLogger &amp;lt; SimpleLogger
&lt;/textarea&gt;
&lt;hr /&gt;
FACTORY/ABSTRACT FACTORY PATTERN
I never had it straight, exactly, what the difference between these patterns were (yes, besides name).  I never bothered to look.  According to the author, Factory returns back a single object while Abstract Factory is &amp;quot;an object dedicated to creating a compatible set of objects&amp;quot;.  According to GoF book (which I have open in front of me), Abstract Factory &amp;quot;provides an interface for creating families of related or dependent objects without specifying their concreate classes&amp;quot;.  Which one do you think would have turned the light bulb off in your head?  :)
The other item was using &amp;quot;Convention Over Configuration&amp;quot; to generate abstract factories:&lt;textarea name="code" class="ruby"&gt;class IOFactory
def initialize(format)
 @reader_class = self.class.const_get(&amp;quot;#{format}Reader&amp;quot;)
 @writer_class = self.class.const_get(&amp;quot;#{format}Writer&amp;quot;)
end
def new_reader
 @reader_class.new
end
def new_writer
 @writer_class.new
end
end
html_factory = IOFactory.new(&amp;#39;HTML&amp;#39;)
html_reader = html_factory.new_reader
pdf_factory = IOFactory.new(&amp;#39;PDF&amp;#39;)
pdf_writer = pdf_factory.new_writer
&lt;/textarea&gt;
Notice the correct classes (reader/writer) are generated dynamically with the help of the const_get Ruby method.
&lt;hr /&gt;
BUILDER PATTERN
Magic methods: &amp;quot;very easy to implement using the method_missing technique...you simply catch all unexpected method calls with method_missing and parse the method name to see if it matches the pattern of your magic method name&amp;quot;.
&lt;textarea name="code" class="ruby"&gt;#example method passed into computer builder class
builder.add_dvd_and_harddisk
#or
builder.add_turbo_and_dvd_dvd_and_harddisk
def method_missing(name, *args)
words = name.to_s.split(&amp;quot;_&amp;quot;)
return super(name, *args) unless words.shift == &amp;#39;add&amp;#39;
words.each do |word|
 #next is same as continue in for loop in C#
 next if word == &amp;#39;and&amp;#39;
 #each of the following method calls are a part of the builder class
 add_cd if word == &amp;#39;cd&amp;#39;
 add_dvd if word == &amp;#39;dvd&amp;#39;
 add_hard_disk(100000) if word == &amp;#39;harddisk&amp;#39;
 turbo if word == &amp;#39;turbo&amp;#39;
end
end
&lt;/textarea&gt;
&lt;hr /&gt;
Last 3 Chapters are the meat of the book:
INTERPRETER PATTERN (place where &lt;a href="http://www.ampgt.com/"&gt;Bellware&lt;/a&gt; told me to start)
DOMAIN SPECIFIC LANGUAGE (DSL)
CONVENTION OVER CONFIGURATION
Those stay obscure so you can go read it.  I think the book is worth a visit on Safari books if you have an account or worth the purchase for the bathroom reading.
I enjoyed it.  Thanks &lt;a href="http://www.ampgt.com/"&gt;Scott&lt;/a&gt; and &lt;a href="http://agilejoe.lostechies.com/"&gt;Joe&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Design+Patterns+in+Ruby+by+Russ+Olsen&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f02%2f25%2fdesign-patterns-in-ruby-by-russ-olsen.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%2f02%2f25%2fdesign-patterns-in-ruby-by-russ-olsen.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=19088" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=LYG5nl4w"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=uQVNneKT"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=50" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=duYCDzIX"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=duYCDzIX" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=mBaegx8h"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=43" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=fkg7Q6Ok"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=fkg7Q6Ok" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/25/design-patterns-in-ruby-by-russ-olsen.aspx</feedburner:origLink></item><item><title>Gitosis and a non-standard SSH port</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/lmRgNRp91fM/gitosis-and-a-non-standard-ssh-port.aspx</link><pubDate>Fri, 13 Feb 2009 19:44:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:17198</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=17198</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=17198</wfw:comment><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/13/gitosis-and-a-non-standard-ssh-port.aspx#comments</comments><description>&lt;p&gt;I recently installed &lt;a href="http://eagain.net/gitweb/?p=gitosis.git;a=summary"&gt;gitosis&lt;/a&gt;, a free way to host your own git repositories, and I am using a non-standard port (not 22).  I tried to clone the gitosis-admin repository and it timed-out.  Learned via &lt;a href="http://mechanicalrobotfish.com/posts/119-installing-git-server-using-gitosis"&gt;this post&lt;/a&gt; that I needed to create a config file under my .ssh folder in my home directory that listed the Host and Port.
Example ~/.ssh/config:
&lt;/p&gt;
&lt;pre name="code" class="c"&gt;Host git.mydomain.com
Port 30000
&lt;/pre&gt;
&lt;p&gt;
When I do this:
&lt;/p&gt;
&lt;pre name="code" class="c"&gt;git clone git-user@git.mydomain.com:gitosis-admin.git
&lt;/pre&gt;
&lt;p&gt;
it will then use my non-standard port to clone the gitosis repository.
I hadn&amp;#39;t done this before.  Good to know.&lt;/p&gt;
&lt;p&gt;This &lt;a target="_blank" href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way"&gt;post&lt;/a&gt; by scie.nti.st is the best HowTo on installing gitosis that I could find.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Gitosis+and+a+non-standard+SSH+port&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f02%2f13%2fgitosis-and-a-non-standard-ssh-port.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%2f02%2f13%2fgitosis-and-a-non-standard-ssh-port.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=17198" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=Wl6pm8Ji"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=1BBR48LG"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=50" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=nLRWm24y"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=nLRWm24y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=bRrcMoFe"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=43" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=KGeNth65"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=KGeNth65" 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/ssh/default.aspx">ssh</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/13/gitosis-and-a-non-standard-ssh-port.aspx</feedburner:origLink></item><item><title>Current Status</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/WDMc-uIcCVA/current-status.aspx</link><pubDate>Thu, 12 Feb 2009 04:53:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:16751</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=16751</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=16751</wfw:comment><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/11/current-status.aspx#comments</comments><description>&lt;p&gt;&lt;b&gt;&lt;i&gt;UPDATE:&amp;nbsp; I&amp;#39;m very eager to see where IronRuby and RSpec go for the .NET world.&amp;nbsp; Testing my C# Applications with RSpec would be awesome.&amp;nbsp; Check out the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/magazine/dd434651.aspx"&gt;MSDN magazine article&lt;/a&gt; about this stuff if you haven&amp;#39;t already.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working with a Ruby on Rails project now (RoR from now on) and
absolutely loving it. I&amp;#39;m on nothing but Linux boxes, working with
Ruby, and have been put in charge of strengthening our testing skills.
I kind of laugh at this because I am having to learn Ruby, Rails,
Nginx, Mongrels, etc and then figure out how to test RoR code.&lt;br /&gt;&lt;br /&gt;I still touch up a C# API for another project at the company I work for; I&amp;#39;m not completely disconnected from the .NET world.&lt;br /&gt;&lt;br /&gt;I
went down the Test::Unit path first, due to the fact that it comes with
Rails. I was quickly reminded why I went down the Behavior Driven
Development path in C#. Test::Unit is a lot of doing Test Driven
Development in NUnit (or other xUnit) fashion. You prefix your tests
with &amp;quot;test_&amp;quot; and go from there. It works. I can&amp;#39;t deny that in either
the .NET world or the Rails world. I just prefer to focus on the
behavior because it highlights that I will only make specifications or
examples pass because they are serving a function my user has requested.&lt;br /&gt;&lt;br /&gt;I
then went down the, ever popular, RSpec path. A few more gems installed
and another TextMate bundle to gain some RSpec macros. I liked it but
it felt like too much. I can&amp;#39;t explain it. I have friends who swear by
RSpec and more power to them. Going down this route also exposed
Zentest/autotest to me. For testing specs I&amp;#39;d use autospec from the
same tool. Once I figured out how to sync Growl (I&amp;#39;m on a Macbook Pro),
the notification tool on a Mac, with autospec, I was in heaven. So I&amp;#39;d
run autospec, it would run all my specs and then spit up a notification
with a green window for passing specs or red for failure with the count
of failed tests. Autospec would then just wait for a file to change and
then run the specs in the file and again notify me. It was like my own
local CI notification.&lt;br /&gt;&lt;br /&gt;I then found out about Shoulda. Shoulda
is a gem/plugin that gives you the same context/should notation as
RSpec but still utilizing the Test::Unit portion of Rails (again
Test::Unit comes with Rails by default). I had some fun getting it
working but with some help on the Google Group
(http://groups.google.com/group/shoula), I was able to get it working
pretty fast. And instead of running autospec, I&amp;#39;d run autotest again
with a few changes to my ~/.autotest file to get my local notifications.&lt;br /&gt;&lt;br /&gt;I
will be posting more posts going into detail about all of these
paragraphs and also about my continuing adventures in the Ruby on Rails
and Linux world.&lt;br /&gt;&lt;br /&gt;Things I will be posting about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nginx&lt;/li&gt;
&lt;li&gt;Apache with Phusion Passenger&lt;/li&gt;
&lt;li&gt;Linux OS (commands, basic setup, security, etc)&lt;/li&gt;
&lt;li&gt;Ruby on Rails&lt;/li&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Django&lt;/li&gt;
&lt;li&gt;TextMate (code editor on Mac)&lt;/li&gt;
&lt;li&gt;CloudFiles (Rackspace Cloud storage)&lt;/li&gt;
&lt;li&gt;Hudson and CruiseControl.rb (Continuous Integration software that works with Ruby)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Current+Status&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f02%2f11%2fcurrent-status.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%2f02%2f11%2fcurrent-status.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=16751" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=2tqPgIqA"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=9dIwmFgP"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=50" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=3lWW39Fo"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=3lWW39Fo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=XhZ3W6zc"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=43" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=H5Sx8aPI"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=H5Sx8aPI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/Linux/default.aspx">Linux</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/ruby/default.aspx">ruby</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/rspec/default.aspx">rspec</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/rails/default.aspx">rails</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/test_3A003A00_unit/default.aspx">test::unit</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/nginx/default.aspx">nginx</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/shoulda/default.aspx">shoulda</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/11/current-status.aspx</feedburner:origLink></item><item><title>Slicehost articles</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/jZf06O5AawI/slicehost-articles.aspx</link><pubDate>Thu, 12 Feb 2009 04:49:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:16750</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=16750</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=16750</wfw:comment><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/11/slicehost-articles.aspx#comments</comments><description>&lt;p&gt;If you are Linux newbie or are still unsure about how to setup your &lt;b&gt;Linux&lt;/b&gt; box/slice/server, take a serious look at the &lt;a target="_blank" href="http://articles.slicehost.com/"&gt;Slicehost Articles&lt;/a&gt;.&amp;nbsp; Other articles include setup of Apache, Nginx, Postfix, MySQL, Ruby on Rails, Capistrano, SSH, Self-signed certificates, Django, etc.&lt;br /&gt;&lt;br /&gt;For all the Only Windows guys who read this, these articles are a great way to get your feet wet with Linux.&amp;nbsp; Can&amp;#39;t hurt your pocket book.&amp;nbsp; It&amp;#39;s free. &lt;a target="_blank" href="http://www.ubuntu.com"&gt;Ubuntu&lt;/a&gt; is currently my favorite distribution.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve &lt;a target="_blank" href="http://www.twitter.com/armmer"&gt;tweeted&lt;/a&gt; about this a number of times.&lt;br /&gt;&lt;br /&gt;These articles are phenomenal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Slicehost+articles&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f02%2f11%2fslicehost-articles.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%2f02%2f11%2fslicehost-articles.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=16750" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=lXrC2wLd"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=Xn1fNvnU"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=50" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=mJlEShNw"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=mJlEShNw" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=xaqhQj7Z"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=43" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=axAbWGFD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=axAbWGFD" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/Linux/default.aspx">Linux</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/slicehost/default.aspx">slicehost</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/howto/default.aspx">howto</category><feedburner:origLink>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/11/slicehost-articles.aspx</feedburner:origLink></item><item><title>Hudson and Nginx</title><link>http://feedproxy.google.com/~r/jasonmeridth/~3/AhzQne1iG2M/hudson-and-nginx.aspx</link><pubDate>Thu, 12 Feb 2009 04:46:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:16748</guid><dc:creator>Jason Meridth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/jason_meridth/rsscomments.aspx?PostID=16748</wfw:commentRss><wfw:comment>http://www.lostechies.com/blogs/jason_meridth/commentapi.aspx?PostID=16748</wfw:comment><comments>http://www.lostechies.com/blogs/jason_meridth/archive/2009/02/11/hudson-and-nginx.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-style:italic;"&gt;UPDATE:  I left HTTP Auth in place via Nginx and removed security from my Hudson instance.  This works for me because I don&amp;#39;t need the Hudson security.  Every developer should be able to manage the CI server.  I&amp;#39;m just trying to prevent external access to the dashboard.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been having fun trying to figure out how to block a user&amp;#39;s ability of going to http://mydomain:8080 and bypassing my 80 to 443 redirect and htpasswd HTTP basic authentication.  I even went as far as removing Nginx and installing Apache.
According to the Hudson site, we can use &lt;a href="http://hudson.gotdns.com/wiki/display/HUDSON/Apache+frontend+for+security"&gt;Apache to do this&lt;/a&gt;.  Either I&amp;#39;m not smart enough or web pages like this reminded me why I hate the Java Enterprise stack as much as I do.  Talk about installation obfuscation.
My problem exists because the Tomcat instance running the hudson war file uses &lt;a href="http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html#Standard%20Implementation"&gt;Apache JServe Protocol&lt;/a&gt; (AJP) and will allow direct access on whatever port you used (default 8080).  This is even if you proxy_pass to 8080 from 443 (SSL) or 80 (Web).
Through testing and research it seems that &lt;a href="http://www.ruby-forum.com/topic/157269#693042"&gt;Nginx does not have a solution for this&lt;/a&gt;.  I can&amp;#39;t allow access to my Hudson instance from external users.  I have a self-signed certificate and a .htpasswd file to protect the instance, but is all useless is someone could just type in http://mydomain.com:8080.  I want that redirected to https://mydomain.com which will then proxy internally to http://127.0.0.1:8080.
I didn&amp;#39;t want to fight this, so I just used iptables (linux firewall) to block external requests on port 8080 but allow internal requests to 8080.  Here is the entry in my iptables file:
&lt;/p&gt;
&lt;pre name="code" class="c"&gt;# Deny HTTP requests to port 8080 externally but allow internally
-A INPUT -i eth0 -p tcp -m tcp --dport 8080 -j REJECT
&lt;/pre&gt;
&lt;p&gt;I only allow access to my server via 80 (web), 443 (ssl) and my ssh port (I&amp;#39;m not telling).
This works for now, but I&amp;#39;m experiencing another weird issue.  I follow the Nginx way of using HTTP basic authentication:
&lt;/p&gt;
&lt;pre name="code" class="c"&gt;location  /  {      
 auth_basic            &amp;quot;Restricted&amp;quot;;
 auth_basic_user_file  conf/htpasswd;
}
&lt;/pre&gt;
&lt;p&gt;If the user listed in the &lt;a href="http://httpd.apache.org/docs/2.0/programs/htpasswd.html"&gt;htpasswd&lt;/a&gt; file is also a registered user on the Hudson instance (through the Hudson UI) then the HTTP basic authentication will work.  If they are in the htpasswd file but not registered with Hudson, it fails with a HTTP 401 (Unauthorized).  Why would the HTTP basic authentication be &amp;quot;tunneled&amp;quot; through to Hudson?
I&amp;#39;ll update this post once I figure it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Hudson+and+Nginx&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjason_meridth%2farchive%2f2009%2f02%2f11%2fhudson-and-nginx.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%2f02%2f11%2fhudson-and-nginx.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=16748" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=ixPILqPs"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=MdUgjr1f"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=50" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=DcZJIJJk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=DcZJIJJk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=aQ75X0Sg"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?d=43" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jasonmeridth?a=oDG2xzQk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jasonmeridth?i=oDG2xzQk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/htpasswd/default.aspx">htpasswd</category><category domain="http://www.lostechies.com/blogs/jason_meridth/archive/tags/apache/default.aspx">apache</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/nginx/default.aspx">nginx</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/02/11/hudson-and-nginx.aspx</feedburner:origLink></item></channel></rss>
