<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Floorplanner Tech Blog &#187; git</title>
	<atom:link href="http://techblog.floorplanner.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.floorplanner.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 19 Nov 2009 04:00:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rails and Merb merge!</title>
		<link>http://techblog.floorplanner.com/2008/12/24/rails-and-merb-merge/</link>
		<comments>http://techblog.floorplanner.com/2008/12/24/rails-and-merb-merge/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 02:39:15 +0000</pubDate>
		<dc:creator>Willem van Bergen</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[awesomeness]]></category>
		<category><![CDATA[bloat]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conflicts]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=398</guid>
		<description><![CDATA[Good luck to the merged Rails team and hopefully Rails 3 will kick ass! Let&#8217;s hope git will really deliver on this gig!  Try to refrain from using git blame too much when resolving merge conflicts.  

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F24%2Frails-and-merb-merge%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F24%2Frails-and-merb-merge%2F" height="61" width="51" /></a></div><p>Good luck to the merged Rails team and hopefully Rails 3 will kick ass! Let&#8217;s hope <strong>git</strong> will really deliver on this gig!  Try to refrain from using <code>git blame</code> too much when resolving merge conflicts. <img src='http://techblog.floorplanner.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><a title="git checkout rails &amp;&amp; git merge merb" href="http://rubyonrails.org/merb"><img class="alignnone size-full wp-image-400" title="git checkout rails &amp;&amp; git merge merb" src="http://techblog.floorplanner.com/wp-content/uploads/2008/12/picture-22.png" alt="git checkout rails &amp;&amp; git merge merb" width="588" height="471" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/12/24/rails-and-merb-merge/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Working with git branches</title>
		<link>http://techblog.floorplanner.com/2008/12/14/working-with-git-branches/</link>
		<comments>http://techblog.floorplanner.com/2008/12/14/working-with-git-branches/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 17:33:16 +0000</pubDate>
		<dc:creator>Willem van Bergen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[bash colors]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[origin]]></category>
		<category><![CDATA[pull]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=321</guid>
		<description><![CDATA[Because Jaap finally convinced Gert-Jan, we have moved to the Git version control system for the main Floorplanner repository. Now we can use branches for different functionality far more easily. As an easy reminder to some common Git tasks I will need regularly, I have written down some Git recipes. This is basically meant for [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F14%2Fworking-with-git-branches%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F14%2Fworking-with-git-branches%2F" height="61" width="51" /></a></div><p>Because <a href="http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses">Jaap finally convinced Gert-Jan</a>, we have moved to the Git version control system for the main Floorplanner repository. Now we can use branches for different functionality far more easily. As an easy reminder to some common Git tasks I will need regularly, I have written down some Git recipes. This is basically meant for me and my fellow developers, but maybe it can help you as well. Suggestions to improve my workflow are welcome!</p>
<h3>Displaying the current branch in your prompt</h3>
<p>Because I will be using branches more regularly now, it is nice to know what branch I am currently working in. <code>git branch</code> will provide this information, but it can be more direct by including the current branch in your terminal prompt. </p>
<p>To display the current git branch in my terminal prompt, I have added <a href="http://gist.github.com/5017"> the following</a> to my Bash configuration file <code>~/.profile</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family: Monaco,monospace;">parse_git_branch() {
  git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
&nbsp;
PS1='\[\033[01;37m\]\w\[\033[00;35m\]$(parse_git_branch)\[\033[00m\] \$ '</pre></div></div>

<p>I use a black, semi-transparent terminal with white text, and pink branch names. <a href="http://www.systhread.net/texts/200703bashish.php">Change the colors</a> to your own liking!</p>
<p><img src="http://techblog.floorplanner.com/wp-content/uploads/2008/12/picture-4.png" alt="Git - branch in terminal" title="Git - branch in terminal" width="574" height="395" class="alignnone size-full wp-image-349" /></p>
<h3>Working on a remote branch that is not available locally yet</h3>
<p>If you want to help out on a branch that somebody else started and has pushed it to the remote repository, you can checkout this branch and make it &#8220;track&#8221; the remote branch.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">$ git checkout -b newbranch origin/newbranch</pre></div></div>

<p>In this example, <strong>origin/newbranch</strong> is the branch in the remote repository. Locally, this branch will be called <strong >newbranch</strong >. A simple <code>git pull</code> will update my branch with the latest changes from the remote branch later on, <code>git push</code> will send my changes to the remote server. </p>
<p><img src="http://techblog.floorplanner.com/wp-content/uploads/2008/12/picture-1.png" alt="Git - track remote branch" title="Git - track remote branch" width="574" height="395" class="alignnone size-full wp-image-336" /></p>
<h3>Creating a new branch and pushing it to the remote server</h3>
<p>Sometimes I want to start a new branch myself if I want to work on a new feature or on disruptive refactoring of the main codebase.</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family: Monaco,monospace;">$ git checkout -b feature</pre></div></div>

<p>The <em>feature</em> branch is now available locally. After some time, I want to share my current changes in this branch with other developers. I should make the branch available in the remote repository so other can access it like I described above.</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family: Monaco,monospace;">$ git commit -m &quot;Added initial version of %feature%&quot;
$ git push origin feature</pre></div></div>

<p><img src="http://techblog.floorplanner.com/wp-content/uploads/2008/12/picture-2.png" alt="Git - push local branch to remote" title="Git - push local branch to remote" width="574" height="395" class="alignnone size-full wp-image-341" /></p>
<p>The feature branch will now be available to other developers as well. Note that the local <em>feature</em>-branch is <strong>not</strong> tracking the remote branch of the same name. This can be enabled by <a href="http://graysky.org/2008/12/git-branch-auto-tracking/">changing the configuration</a> of the repository.</p>
<h3>Merging a branch</h3>
<p>After work is completed on my <em>feature</em>-branch and it is tested thoroughly, I want to merge the branch with the master branch of the project. To make sure the merge with the master branch is seamless and all possible merge conflicts are handled beforehand, we first run <code>git rebase</code>. This ensures that the changes in the <em>feature</em> branch are relative to the latest commit to the master branch and can therefore be applied by a &#8220;fast forward&#8221;. It is best to run <code>git rebase</code> from time time to time while you are developing in the <em>feature</em> branch to make sure your work does not divert to much from the main development in the master branch.</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family: Monaco,monospace;">  # make sure that the current branch is seamlessly
  # mergeable with the master branch
$ git rebase master
  # switch to the master branch
$ git checkout master
  # now, merge the feature branch
$ git merge feature
  # publish the merge to the remote server
$ git push origin master</pre></div></div>

<p><img src="http://techblog.floorplanner.com/wp-content/uploads/2008/12/picture-3.png" alt="Git - merge branch" title="Git - merge branch" width="574" height="395" class="alignnone size-full wp-image-343" /></p>
<p>I can now delete the local and remote feature branch, as the changes have been incorporated in the master branch:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family: Monaco,monospace;">$ git branch -d feature
$ git branch -d -r origin/feature</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/12/14/working-with-git-branches/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git vs SVN for bosses</title>
		<link>http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses/</link>
		<comments>http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 23:56:13 +0000</pubDate>
		<dc:creator>jaap</dc:creator>
				<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=300</guid>
		<description><![CDATA[We switched to Git this morning. Before making this switch Gert-Jan (CTO of Floorplanner) asked me: &#8220;what is the advantage of Git over Subversion?&#8221;. I answered him and thought I&#8217;ll make a post of the answer as it can be useful for other bosses like Gert-Jan.
Since we started using Subversion, which was a couple of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F09%2Fgit-vs-svn-for-bosses%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F12%2F09%2Fgit-vs-svn-for-bosses%2F" height="61" width="51" /></a></div><p>We switched to Git this morning. Before making this switch Gert-Jan (CTO of Floorplanner) asked me: &#8220;what is the advantage of Git over Subversion?&#8221;. I answered him and thought I&#8217;ll make a post of the answer as it can be useful for other bosses like Gert-Jan.</p>
<p>Since we started using Subversion, which was a couple of years ago, using a code versioning tool helped us a lot. We could work on Floorplanner with the whole team together without storing the &#8220;repository&#8221; on our remote FTP location (early days) or emailing changes up and forth (ancient times <img src='http://techblog.floorplanner.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). But when working with Subversion for some time, little things started to bother, i&#8217;ll sum them up:</p>
<p>1. We needed tutorials for creating a branch in SVN every time again<br />
2. When merging the branch back, SVN didn&#8217;t know where that branch started.<br />
3. When merging the branch back, each change was recorded back as the user who did the merge.</p>
<h3>The consequences of these disadvantages.</h3>
<p>We avoided creating branches.</p>
<h3>Why is not creating branches bad practice?</h3>
<p>I&#8217;ll give you an example. Sometimes when we were working on some big feature, we didn&#8217;t create a branch (it was a lot of work), we just committed it into the trunk when it was &#8220;kinda&#8221; ready. Then a sudden exception in the software that was online occurred, we now had a problem! That bug had to be fixed NOW, but the changes we just committed into the trunk were not fully tested and couldn&#8217;t go online. You understand this was a tedious process and resulted in more downtime sometimes.</p>
<h3>But why is Git better?</h3>
<p>1. Creating branches in Git is a lot easier than doing this in SVN.<br />
2. Git keeps track where branches come from. So when creating a branch, merging back is very simple.<br />
3. It keeps commit messages intact, when merging.</p>
<h3>Conclusion</h3>
<p>The whole point, remember this post is called &#8220;Git vs SVN for bosses&#8221;, branching is a joy in Git and this results in better being able to have access to different versions of the same software at the same time, which again results in being able to fix that bug NOW.</p>
<h4>Other resources</h4>
<p><a title="Git SVN Comparison" href="http://git.or.cz/gitwiki/GitSvnComparsion">http://git.or.cz/gitwiki/GitSvnComparsion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Batch file renaming</title>
		<link>http://techblog.floorplanner.com/2008/09/20/batch-file-renaming/</link>
		<comments>http://techblog.floorplanner.com/2008/09/20/batch-file-renaming/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 07:49:43 +0000</pubDate>
		<dc:creator>Willem van Bergen</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[html.erb]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[rhtml]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=203</guid>
		<description><![CDATA[I just started working on an old Rails project after having neglected it for 15 months. Most of the view files still had the good old .rhtml extension. I was too lazy to rename these files by hand, both on my file system and in the git repository. I used the following Bash commands to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F09%2F20%2Fbatch-file-renaming%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F09%2F20%2Fbatch-file-renaming%2F" height="61" width="51" /></a></div><p>I just started working on an old Rails project after having neglected it for 15 months. Most of the view files still had the good old <code>.rhtml</code> extension. I was too lazy to rename these files by hand, both on my file system and in the git repository. I used the following Bash commands to do the job:</p>
<p>First, I renamed all the partials to the <code>.erb</code> extension. Note: I am not using .html.erb, as some of these partials are used in <code>js</code>-formatted responses as well:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family: Monaco,monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> app<span style="color: #000000; font-weight: bold;">/</span>views<span style="color: #000000; font-weight: bold;">/**/</span>_<span style="color: #000000; font-weight: bold;">*</span>.rhtml<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> \
  git <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> s<span style="color: #000000; font-weight: bold;">/</span>\\.rhtml$<span style="color: #000000; font-weight: bold;">/</span>.erb<span style="color: #000000; font-weight: bold;">/`</span>; \
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>The remaining files could now be renamed to <code>.html.erb</code> with a similar command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family: Monaco,monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> app<span style="color: #000000; font-weight: bold;">/</span>views<span style="color: #000000; font-weight: bold;">/**/*</span>.rhtml<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> \
  git <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> s<span style="color: #000000; font-weight: bold;">/</span>\\.rhtml$<span style="color: #000000; font-weight: bold;">/</span>.html.erb<span style="color: #000000; font-weight: bold;">/`</span>; \
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p><small>Note that this technique works with <strong>Subversion</strong> as well: just substitute <code>git</code> with <code>svn</code> in the command above. A regular rename is possible as well by leaving out <code>git</code> altogether!</small> </p>
<p>Now my file names are Rails-compliant again, I can start refactoring all the code that is not up to current Rails standards anymore. Ah, the virtues of developing with a rapidly evolving framework&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/09/20/batch-file-renaming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remote branches in git</title>
		<link>http://techblog.floorplanner.com/2008/09/13/remote-branches-in-git/</link>
		<comments>http://techblog.floorplanner.com/2008/09/13/remote-branches-in-git/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 13:26:11 +0000</pubDate>
		<dc:creator>Willem van Bergen</dc:creator>
				<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[merging]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=165</guid>
		<description><![CDATA[I have been using git for a while now, and I believe I have the the basic workflow under control.  Committing, reverting, using local branches for major refactoring work: been there, done that!   However, I recently got some collaborators on my github-projects, I had to start working with other remote repositories and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F09%2F13%2Fremote-branches-in-git%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F09%2F13%2Fremote-branches-in-git%2F" height="61" width="51" /></a></div><p>I have been using git for a while now, and I believe I have the the basic workflow under control.  Committing, reverting, using local branches for major refactoring work: been there, done that! <img src='http://techblog.floorplanner.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  However, I recently got some collaborators on <a href="http://github.com/wvanbergen/">my github-projects</a>, I had to start working with other remote repositories and branches. </p>
<p>I found <a href="http://blog.ericgoodwin.com/2008/4/6/pushing-and-pulling-branches-on-github">this blog post</a>, which was really helpful. I am sharing some others things that helped me in the last couple of weeks. Hopefully, this saves other people some time Googling. If you know a better ways to accomplish these tasks, please let me know!</p>
<h3> Things to remember about remote branches </h3>
<p>Because I had some troubles discovering how to properly work with remote repositories, I am sharing what I found. The most important things to remember:</p>
<ul>
<li>Your local branches are not really connected to the remote branches. It is therefore possible to mix up branches, but this is usually not what you want <img src='http://techblog.floorplanner.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>Never forget to switch to the correct local branch (using <code>git checkout <em>local-branch</em></code>.</li>
<li> The names of the local and remote do not need to match.</li>
<li> Before you can push changes from a local branch to a remote branch, all the commits of the remote branch have to be included in your local branch. This can be done using by executing <code>git pull <em>remote-name</em> <em>remote-branch</em></code> in your local branch.
</ul>
<h3> Checking out a newly created branch in a remote repository </h3>
<p><a href="https://github.com/barttenbrinke">Bart</a> is implementing Merb log parsing for <a href="https://github.com/wvanbergen/request-log-analyzer">request-log-analyzer</a>. He has put his progress in a separate branch of the github project. My local repository does not yet include this branch, but I want to check it out. Note that I am using a different name than the branch name on the github project.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">$ git branch merb origin/generic_base
$ git checkout merb</pre></div></div>

<p>When the new functionality is finished, the following commands will merge the changes in the merb branch to the master branch.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">  # goto my local master branch and merge the merb-branch
$ git checkout master
$ git merge merb
&nbsp;
  # push the changes to the master branch on github
$ git push origin master</pre></div></div>

<h3> Merging back a fork </h3>
<p><a href="http://github.com/gbdev">Wes Hays</a> is helping me out on the <a href="http://github.com/wvanbergen/scoped_search">scoped_search plugin</a>. He implemented <code>OR</code> in the query language in his <a href="http://github.com/gbdev/scoped_search/tree/master">own fork</a>. I wanted to merge his changes back to master branch:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">  # add a reference to the remote repository
$ git remote add gbdev git://github.com/gbdev/scoped_search.git
&nbsp;
  # create a local branch for the fork to follow a remote branch
$ git branch gbdev-fork gbdev/master
$ git checkout gbdev-fork</pre></div></div>

<p>Now, my local <strong>gbdev-fork</strong> branch contains Wes&#8217;s code. Because Wes&#8217;s repository was forked from my repository, git will know that most of the history of my <code>master</code> branch and <code>gbdev-fork</code> branch is the same. </p>
<p>After some testing, I was ready to include his changes by merging the <code>gbdev-fork</code> branch into my local master branch:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">  # go back to my master branch, and merge the changes
$ git checkout master
$ git merge gbdev-fork
  # push the changes to the master branch at hithub
$ git push origin master</pre></div></div>

<h3> Pushing tags to a remote repository </h3>
<p>You can create tags locally, but you probably want to send them to the remot repository as well:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family: Monaco,monospace;">  # create a local tag &quot;tagname&quot; with the given message.
$ git tag -a &quot;tagname&quot; -m &quot;message&quot; 
  # send your tags to the remote repository &quot;origin&quot;
$ git push origin --tags</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/09/13/remote-branches-in-git/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using git-svn</title>
		<link>http://techblog.floorplanner.com/2008/07/11/using-git-svn/</link>
		<comments>http://techblog.floorplanner.com/2008/07/11/using-git-svn/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:49:06 +0000</pubDate>
		<dc:creator>Willem van Bergen</dc:creator>
				<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[source code management]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=91</guid>
		<description><![CDATA[I personally am a fan of the git version control system. The best part of git is its speed, and the simplicity of using local branches.
Local branches are very helpful if you are working on different features at the same time but want to keep them apart. An example: it happens all the time that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F07%2F11%2Fusing-git-svn%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechblog.floorplanner.com%2F2008%2F07%2F11%2Fusing-git-svn%2F" height="61" width="51" /></a></div><p>I personally am a fan of the <em>git</em> version control system. The best part of git is its speed, and the simplicity of using local branches.</p>
<p>Local branches are very helpful if you are working on different features at the same time but want to keep them apart. An example: it happens all the time that I am working on some feature and than I have to put my current work aside to work on a high priority issue. Once this issue is solved, I need to commit the changes and usually do a deploy of the web application so that the problem is solved as soon as possible. With Subversion, I sometimes commit files that were part of the unfinished feature I was working on before I started on the high priority issue. If I am not careful and deploy those files, unfinished work will be put into production and this can go horribly wrong, like every page request returning a 500-error of our high traffic site <img src='http://techblog.floorplanner.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
<p>Using git, I can put my current work aside easily by using <code>git stash</code>. When I am finished with the high priority issue, I can revert to my previous work with <code>git stash apply</code>. </p>
<p>Another option: branching the project (using <code>git branch <em>feature</em></code>) if the feature I am working on is invasive and than switch branches for high priority issues using <code>git checkout master</code>. I can go back to the <em>feature</em> branch with <code>git checkout <em>feature</em></code>, followed by <code>git merge master</code> to merge back the changes I just made in the master branch. Branching and merging is very fast in git and merging is not the PITA like it is in Subversion.</p>
<p>However, our main code repository will probably remain in SVN for now. Luckily for me, I can use <em>git-svn</em> locally to profit from these advantages. I found <a href="http://www.aidanf.net/blog/2007/12/10/using-git-offline-commits-subversion-repository">an informative page</a> on installing and getting started with git-svn on OSX. If you know Subversion, <a href="http://git.or.cz/course/svn.html">this page</a> is helpful to translate Subversion commandos to their git alternatives.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/07/11/using-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
