<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Bob&apos;s Blog - ColdFusion Tidbits - Git</title>
			<link>http://www.silverwareconsulting.com/index.cfm</link>
			<description>Some stuff about ColdFusion and Transfer</description>
			<language>en-us</language>
			<pubDate>Thu, 09 Sep 2010 04:53:05 -0400</pubDate>
			<lastBuildDate>Tue, 31 Aug 2010 11:04:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>bob.silverberg@gmail.com</managingEditor>
			<webMaster>bob.silverberg@gmail.com</webMaster>
			
			<item>
				<title>Using Git Rebase to Squash Commits - Revisited</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/8/31/Using-Git-Rebase-to-Squash-Commits--Revisited</link>
				<description>
				
				I wrote a blog post awhile back about &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits&quot;&gt;using Git rebase to squash a bunch of small commits into a single commit.&lt;/a&gt;
I really like this approach as it allows me to commit frequently without having to litter my public repo with lots of meaningless commits. 
I&apos;ve recently been researching Git workflows, trying to come up with a workflow for contributors to &lt;a href=&quot;http://www.validatethis.org&quot; target=&quot;_blank&quot;&gt;ValidateThis&lt;/a&gt;, 
and noticed that there&apos;s an easier way to start a rebase for all commits in a branch, which is generally what I need to rebase.&lt;/p&gt;
&lt;p&gt;When I start working on a new feature, or even a bug fix, I generally start a new branch for it: &lt;code&gt;git checkout -b newBranch&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I then make my changes, committing frequently. When I&apos;m ready to merge my changes back into the &lt;em&gt;master&lt;/em&gt; branch I don&apos;t want all of those small, meaningless
commits showing up, so I use &lt;em&gt;get rebase&lt;/em&gt; to squash them. In the pervious article I discussed how I&apos;d use &lt;em&gt;git log&lt;/em&gt; to determine how many commits
I wanted to rebase and then use &lt;em&gt;git rebase -i HEAD~n&lt;/em&gt;, where &lt;em&gt;n&lt;/em&gt; is the number of commits that I want to rebase. This is a useful feature if your
commits are already in your &lt;em&gt;master&lt;/em&gt; branch, but if all you want to do is rebase all of the commits in the current branch (&lt;em&gt;newBranch&lt;/em&gt; in this example),
then you can simply do: &lt;code&gt;git rebase -i master&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Which tells Git to rebase all of the commits in the current branch that are not already in &lt;em&gt;master&lt;/em&gt;. After issuing that command you can follow the steps
as described in the &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits&quot;&gt;previous article&lt;/a&gt; to choose which ones to squash and then to create a new commit message.&lt;/p&gt; 
				</description>
				
				<category>Git</category>				
				
				<pubDate>Tue, 31 Aug 2010 11:04:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/8/31/Using-Git-Rebase-to-Squash-Commits--Revisited</guid>
				
			</item>
			
			<item>
				<title>Comparing Files from Different Branches with Git Difftool</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/6/21/Comparing-Files-from-Different-Branches-with-Git-Difftool</link>
				<description>
				
				As a relative newcomer to Git one of the things I&apos;ve struggled most with is how to compare files from different branches. 
The challenge comes from the fact that, from the perspective of the file system, two branches cannot exist at the same time.
When you switch from one branch to another the new branch replaces the old branch, so you cannot use a native file compare tool to compare two sets
of files, as there really is only one set of files at any point in time. Now I admit that I might be totally wrong about this, 
and I&apos;m sure that there are other, perhaps better, solutions to the issue, but the one that works for me currently is &lt;em&gt;git difftool&lt;/em&gt;.
&lt;h3&gt;What is Git Difftool?&lt;/h3&gt;
&lt;p&gt;According to the &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/git-difftool.html&quot; target=&quot;_blank&quot;&gt;man page for git-difftool&lt;/a&gt;,
	&lt;blockquote&gt;
		&lt;p&gt;
			&lt;em&gt;git difftool&lt;/em&gt; is a git command that allows you to compare and edit files between revisions using common diff tools.
			&lt;em&gt;git difftool&lt;/em&gt; is a frontend to &lt;em&gt;git diff&lt;/em&gt; and accepts the same options and arguments.&lt;/p&gt;
	&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;
	I&apos;ve tried using &lt;em&gt;git diff&lt;/em&gt; in the past and, after spending years working with a wonderful tool like Subclipse&apos;s &lt;em&gt;Synchronize with Repository&lt;/em&gt;,
	I just did not enjoy the output of &lt;em&gt;git diff&lt;/em&gt; at all.
Luckily, &lt;em&gt;git difftool&lt;/em&gt; works with a file compare tool on your system, making the output much easier (for me at least) to deal with. 
On my system, which is OS X, because I have the Apple Developer Tools installed, when I issue the &lt;em&gt;git difftool&lt;/em&gt; the output is sent to &lt;em&gt;opendiff&lt;/em&gt;,
which in turn uses &lt;em&gt;FileMerge&lt;/em&gt; which is a nice, graphical file compare and merge tool. Other than installing the developer tools, which I did long before
I started using Git, I didn&apos;t have to do any other setup. I honestly have no idea how easy it is to set up a graphical compare tool to work
with &lt;em&gt;git difftool&lt;/em&gt; on a Windows or Linux box, but I&apos;m guessing it cannot be that difficult.&lt;/p&gt;
&lt;h3&gt;Using Git Difftool&lt;/h3&gt;
&lt;p&gt;To start a compare, you simply issue the &lt;em&gt;git difftool&lt;/em&gt; command and pass it paths to two sets of files. 
The paths look like &lt;em&gt;branchName&lt;/em&gt;:&lt;em&gt;path&lt;/em&gt;. So if I wanted to compare the file &lt;em&gt;ValidationFactory.cfc&lt;/em&gt; from the &lt;em&gt;master&lt;/em&gt; branch
to the same file in the &lt;em&gt;newStuff&lt;/em&gt; branch, I&apos;d type: &lt;code&gt;git difftool master:ValidationFactory.cfc newBranch:ValidationFactory.cfc&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I&apos;d see a prompt that says something like:
&lt;code&gt;merge tool candidates: opendiff kdiff3 tkdiff xxdiff meld kompare gvimdiff diffuse ecmerge araxis emerge vimdiff
Viewing: &apos;master:ValidationFactory.cfc&apos;
Hit return to launch &apos;opendiff&apos;:&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And when I hit return FileMerge would open up with both files displayed. If I want to compare an entire folder, I can just type
&lt;code&gt;git difftool master:ValidateThis/core/ newBranch:ValidateThis/core/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And then I receive that prompt for each individual file in turn.&lt;/p&gt;
&lt;p&gt;I still don&apos;t think this is anywhere near as good as what I had with Subclipse, and I&apos;m guessing there are ways to configure it to make it even friendlier, 
but for now it&apos;s much better than &lt;em&gt;git diff&lt;/em&gt;.&lt;/p&gt; 
				</description>
				
				<category>OS X</category>				
				
				<category>Git</category>				
				
				<pubDate>Mon, 21 Jun 2010 15:10:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/6/21/Comparing-Files-from-Different-Branches-with-Git-Difftool</guid>
				
			</item>
			
			<item>
				<title>Using Git Rebase to Squash Commits</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits</link>
				<description>
				
				A Git command that can be very useful, yet is often overlooked by beginners (such as myself) is the &lt;em&gt;rebase&lt;/em&gt; command.
I admit to not fully understanding all of its uses, but there is one simple use for it that I have found myself taking advantage of lately.
Here&apos;s the scenario:&lt;/p&gt;
&lt;p&gt;You have a remote Git repository, perhaps hosted at &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;. You want to work on a
new feature, so you create a local branch on your machine: &lt;code&gt;git checkout -b newBranch&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You make some changes and commit them to the local branch: &lt;code&gt;git commit -a -m&quot;My first set of changes&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You make some more changes and commit them to the local branch: &lt;code&gt;git commit -a -m&quot;My second set of changes&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You make some more changes and commit them to the local branch: &lt;code&gt;git commit -a -m&quot;My third set of changes&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You now have three separate commits that relate to one feature, and the feature is complete. You could simply push the changes to your remote,
but then you&apos;d end up with three commits on the remote that are not particularly meaningful. The only reason you have three commits in your local repo is
that you completed the work in three steps. Perhaps you&apos;d rather have just one commit reported in the remote repo for this feature. Thankfully &lt;em&gt;git rebase&lt;/em&gt; 
allows you to do that very simply.  [More]
				</description>
				
				<category>Git</category>				
				
				<pubDate>Sun, 06 Jun 2010 21:40:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits</guid>
				
			</item>
			
			<item>
				<title>Using TextMate as the Default Editor for Git on OS X</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/6/3/Using-TextMate-as-the-Default-Editor-for-Git-on-OS-X</link>
				<description>
				
				There are a number of Git commands which pop open a text editor which you then use to provide information. For example, if you issue the command:
&lt;code&gt;git commit&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The editor will appear allowing you to type your commit message. The default editor that appears for me, on OS X, is &lt;em&gt;vi&lt;/em&gt;
which is a strange beast to work with if you&apos;ve never encountered it before (which I hadn&apos;t, prior to using Git). 
I found a &lt;a href=&quot;http://www.tuxfiles.org/linuxhelp/vimcheat.html&quot; target=&quot;_blank&quot;&gt;helpful cheat sheet&lt;/a&gt;, which allowed me to use the
editor, but I still find it cumbersome. Thankfully it&apos;s a pretty simple matter to use a different text editor with Git. There are a number of ways of doing this, and I&apos;m going to discuss two of them. To start, let&apos;s look at how Git decides what editor to use.&lt;/p&gt;
&lt;h3&gt;Which editor will Git use?&lt;/h3&gt;
&lt;p&gt;According to the &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/git-commit.html&quot; target=&quot;_blank&quot;&gt;man page for git-commit&lt;/a&gt;:
	&lt;blockquote&gt;
		&lt;p&gt;The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order).&lt;/p&gt;
	&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;We&apos;re going to look at changing the EDITOR environment variable and the core.editor configuration variable.&lt;/p&gt;
&lt;p&gt; 
&lt;h3&gt;Change the EDITOR environment variable&lt;/h3&gt;
&lt;p&gt;Simply add the following line to your .bash_profile:&lt;code&gt;export EDITOR=&quot;/usr/bin/mate -w&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will cause Git to use TextMate, and may also allow other command line tools to use it as well.&lt;/p&gt;
&lt;h3&gt;Change the core.editor configuration variable&lt;/h3&gt;
&lt;p&gt;Issue the following command:&lt;code&gt;git config --global core.editor &quot;mate -w&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is useful if you only want to change the behaviour of Git, and not affect the rest of your environment.&lt;/p&gt; 
				</description>
				
				<category>OS X</category>				
				
				<category>Git</category>				
				
				<pubDate>Thu, 03 Jun 2010 09:23:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/6/3/Using-TextMate-as-the-Default-Editor-for-Git-on-OS-X</guid>
				
			</item>
			
			<item>
				<title>Git Cheat Sheet</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/2/17/Git-Cheat-Sheet</link>
				<description>
				
				I&apos;ve been using Git for awhile, but I still use Subversion for most of my projects, so I seem to always come back to Git after a long break. Of course, by that time I&apos;ve
forgotten how to do certain things, so I thought I&apos;d throw together a quick cheat sheet that I, and anyone else, can use as a reference. 
I will continually update this post as I come up with new questions and answers.  [More]
				</description>
				
				<category>Git</category>				
				
				<pubDate>Wed, 17 Feb 2010 10:05:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/2/17/Git-Cheat-Sheet</guid>
				
			</item>
			
			<item>
				<title>Using Git and GitHub to Sync Config Files between Machines</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/11/4/Using-Git-and-GitHub-to-Sync-Config-Files-between-Machines</link>
				<description>
				
				This post is a follow-up to my earlier post about &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2009/10/30/Placing-Config-Files-Under-Version-Control-with-Git-and-GitHub&quot; target=&quot;_blank&quot;&gt;Placing Config Files Under Version Control with Git and GitHub&lt;/a&gt;. In that post I discussed how one can use Git and &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt; to place your config files under version control (via Git), and to maintain a backup of them (via GitHub). In this post I&apos;m going to discuss a set up that will allow another machine&apos;s config files to stay in sync with the originals. The scenario I&apos;m discussing involves config files, but one could use this approach for any set of files that one wants to keep in sync between two machines.  [More]
				</description>
				
				<category>OS X</category>				
				
				<category>Git</category>				
				
				<pubDate>Wed, 04 Nov 2009 11:39:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/11/4/Using-Git-and-GitHub-to-Sync-Config-Files-between-Machines</guid>
				
			</item>
			
			<item>
				<title>Placing Config Files Under Version Control with Git and GitHub</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/10/30/Placing-Config-Files-Under-Version-Control-with-Git-and-GitHub</link>
				<description>
				
				Working with Git, I&apos;ve become aware of the fact that there are certain config files on my machine which require customization and therefore would be nice to have under version control. These files are often referred to as dot files, or dotfiles, as their names all start with a dot.  The three files that I currently have under version control are .bash_profile, .gitconfig and .gitignore. The first two of those files expect to reside in my home directory, but the way Git works, in order to place them under version control they need to reside in a folder that is also a Git repository.&lt;/p&gt;
&lt;p&gt;For obvious reasons I don&apos;t want to make my home directory a Git repo, but there&apos;s a simple solution to this problem. Using symbolic links, a topic that I discussed in an &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2009/10/30/Mac-Command-Line-Interface-Tips--Creating-Symbolic-Links&quot;&gt;earlier blog post&lt;/a&gt;, I can keep my dotfiles in a Git repo, and also continue to use them as live config files.
Here is a step-by-step guide to getting your dotfiles under version control with Git:  [More]
				</description>
				
				<category>OS X</category>				
				
				<category>Git</category>				
				
				<pubDate>Fri, 30 Oct 2009 13:39:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/10/30/Placing-Config-Files-Under-Version-Control-with-Git-and-GitHub</guid>
				
			</item>
			
			<item>
				<title>OS X Command Line Interface Tips - Customizing the Bash Shell</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/10/28/OS-X-Command-Line-Interface-Tips--Customizing-the-Bash-Shell</link>
				<description>
				
				I&apos;ve been working on a Mac for around four months now, and never really had much reason to open up Terminal and use the command line interface (CLI), other than for starting and stopping Tomcat. Now that I&apos;ve started trying to learn about Git, I&apos;m using the command line more and more, and finding out new stuff daily, so I&apos;m going to write the occasional post to share some of this info.&lt;/p&gt;
&lt;h3&gt;About Bash&lt;/h3&gt;
&lt;p&gt;The operating system that most of us run on Macs is called OS X, and it&apos;s based on Unix. The way that one interacts with Unix is via a command shell, and the default shell for OS X is called Bash. It allows us to interact with our operating system without going through the graphical user interface (GUI) that sits on top of the OS. According to &lt;a href=&quot;http://en.wikipedia.org/wiki/Bash&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt; Bash stands for &lt;em&gt;Bourne-again shell&lt;/em&gt; as it is a successor to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Bourne_shell&quot; target=&quot;_blank&quot;&gt;Bourne shell&lt;/a&gt;. So, when you open up Terminal, or &lt;a href=&quot;http://iterm.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;iTerm&lt;/a&gt; which is an enhanced Terminal alternative, you are interacting with the Bash shell.  [More]
				</description>
				
				<category>OS X</category>				
				
				<category>Git</category>				
				
				<category>bash</category>				
				
				<pubDate>Wed, 28 Oct 2009 13:56:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/10/28/OS-X-Command-Line-Interface-Tips--Customizing-the-Bash-Shell</guid>
				
			</item>
			
			<item>
				<title>Setting up a Mac to Work with Git and GitHub</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/10/26/Setting-up-a-Mac-to-Work-with-Git-and-GitHub</link>
				<description>
				
				After hearing much on Twitter and the blogisphere about Git, I&apos;ve finally decided that I need to invest some time in learning about it so I can decide whether or not it&apos;s for me.&lt;/p&gt;
&lt;p&gt;I started out by watching a video that I found linked to somewhere. The video, &lt;a href=&quot;http://developer.yahoo.com/yui/theater/video.php?v=prestonwerner-github&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Tom Preston-Werner, Chris Wanstrath and Scott Chacon -- Git, GitHub and Social Coding&lt;/em&gt;&lt;/a&gt; consists of three presentations by the guys that created &lt;a href=&quot;http://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;. The first one, by Tom Preston-Werner, provided a nice overview of Git and GitHub - I found it quite useful. The second one, by Chris Wanstrath, went into more detail about GitHub itself. Although this is not necessary information for using Git, I found it to be quite inspirational. I began to see how not only is Git a cool version control tool, but how combining it with with something like GitHub can potentially help an open source project get more contributors, as it really lowers the barrier to entry. The final presentation, by Scott Chacon was way over my head.  I didn&apos;t get much out of it, but may view it again in the future when I become proficient with Git.&lt;/p&gt;
&lt;p&gt;Having attained a basic understanding of Git, I decided that it was time to install it, and attempt to move one of my open source projects to GitHub. I found a number of blog posts that cover getting started with Git, including a very useful series by &lt;a href=&quot;http://www.henke.ws/&quot; target=&quot;_blank&quot;&gt;Mike Henke&lt;/a&gt;, which starts with &lt;a href=&quot;http://www.henke.ws/post.cfm/setting-up-a-riaforge-projects-with-git-and-github-part-1&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Setting Up a Riaforge Project with Git and Github (Part 1)&lt;/em&gt;&lt;/a&gt;. Mike&apos;s posts cover setting up Git on Windows, and as I&apos;m on a Mac I needed some more information. I found a post by &lt;a href=&quot;http://www.jaisenmathai.com/&quot; target=&quot;_blank&quot;&gt;Jaisen Mathai&lt;/a&gt; entitled &lt;a href=&quot;http://www.jaisenmathai.com/blog/2008/04/10/how-to-get-started-hosting-your-git-repository-using-github-and-osx/&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;How to get started hosting your git repository using GitHub and OSX&lt;/em&gt;&lt;/a&gt;, which included most of the setup instructions, as well as a post by &lt;a href=&quot;http://theappleblog.com/author/bed42/&quot; target=&quot;_blank&quot;&gt;Andrew Bednarz&lt;/a&gt; on theAppleBlog called &lt;a href=&quot;http://theappleblog.com/2009/03/10/using-git-with-os-x-6-tools-to-get-you-up-and-running/&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Using Git With OS X: 6 Tools to Get You Up and Running&lt;/em&gt;&lt;/a&gt; which directed me to some of the software. I decided to take all of the information that I gleaned from those resources are compile it into this one post, for others that would like to get started with Git and GitHub on a Mac.  [More]
				</description>
				
				<category>Git</category>				
				
				<pubDate>Mon, 26 Oct 2009 10:37:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/10/26/Setting-up-a-Mac-to-Work-with-Git-and-GitHub</guid>
				
			</item>
			</channel></rss>