<?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>Ruby on Rails Notes &#187; Git</title> <atom:link href="http://railsnotes.com/tag/git/feed/" rel="self" type="application/rss+xml" /><link>http://railsnotes.com</link> <description>A code-heavy brain dump of stuff I come across working on Ruby on Rails projects including Models, ActiveRecord, Views, Controllers, RESTful rails, deployment, server stuff, etc.</description> <lastBuildDate>Sun, 29 Aug 2010 23:45:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Show Git Branch in Bash Terminal</title><link>http://railsnotes.com/603-show-git-branch-in-bash-terminal/</link> <comments>http://railsnotes.com/603-show-git-branch-in-bash-terminal/#comments</comments> <pubDate>Tue, 19 May 2009 18:29:16 +0000</pubDate> <dc:creator>Melvin Ram</dc:creator> <category><![CDATA[Other]]></category> <category><![CDATA[Git]]></category> <category><![CDATA[terminal]]></category><guid
isPermaLink="false">http://www.railsnotes.com/?p=603</guid> <description><![CDATA[via Bedazzle Your Bash Prompt with Git Info // RailsTips by John Nunemaker. I came across the above rails tip by John Nunemaker today. It shows how you can show which git branch you&#8217;re on while in your bash terminal. The code he provided didn&#8217;t exactly work for me (I&#8217;m on OSX) so I ended up [...]]]></description> <content:encoded><![CDATA[<p></p><p>via <a
href="http://railstips.org/2009/2/2/bedazzle-your-bash-prompt-with-git-info">Bedazzle Your Bash Prompt with Git Info // RailsTips by John Nunemaker</a>.</p><p>I came across the above rails tip by John Nunemaker today. It shows how you can show which git branch you&#8217;re on while in your bash terminal.</p><p>The code he provided didn&#8217;t exactly work for me (I&#8217;m on OSX) so I ended up changing things a little bit:</p><pre>function parse_git_branch {
  git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

GREEN="\[33[0;32m\]"
YELLOW="\[33[0;33m\]"
WHITE="\[33[0;0m\]"

PS1="$GREEN\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$WHITE\$ "</pre><p>This produces a bash that looks like the screenshot below. As you&#8217;ve probably guessed, jetpack is the git repo/directory and authorization is the branch I&#8217;m currently on.</p><p><img
class=" alignnone" src="http://www.quicksnapper.com/files/6316/14162987944A12F843CB269_m.png" alt="Git repo on authorization branch" width="576" height="488" /></p> ]]></content:encoded> <wfw:commentRss>http://railsnotes.com/603-show-git-branch-in-bash-terminal/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Git Workflow</title><link>http://railsnotes.com/442-git-workflow/</link> <comments>http://railsnotes.com/442-git-workflow/#comments</comments> <pubDate>Tue, 05 May 2009 10:20:10 +0000</pubDate> <dc:creator>Melvin Ram</dc:creator> <category><![CDATA[Other]]></category> <category><![CDATA[Git]]></category> <category><![CDATA[links]]></category><guid
isPermaLink="false">http://www.railsnotes.com/?p=442</guid> <description><![CDATA[ReinH &#124; A Git Workflow for Agile Teams Sharing of good work-flow is one of the keys to adoption and effective use of new technology. Git is a relatively new technology and it&#8217;s workflow is not a topic that is discussed often in the Rails community SO it intrigued me when Bryan Liles mentioned the [...]]]></description> <content:encoded><![CDATA[<p></p><p><img
class="alignright size-medium wp-image-452" style="padding: 10px" src="http://www.railsnotes.com/wp-content/uploads/2009/05/creative-flow-directly-from-god1-300x213.jpg" alt="creative-flow-directly-from-god1" width="300" height="213" /></p><p><a
href="http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html?dsq=9007869#comment-9007869">ReinH | A Git Workflow for Agile Teams</a></p><p><a
href="http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html?dsq=9007869#comment-9007869"></a>Sharing of good work-flow is one of the keys to adoption and effective use of new technology.</p><p>Git is a relatively new technology and it&#8217;s workflow is not a topic that is discussed often in the Rails community SO it intrigued me when <a
href="http://smartic.us/" target="_blank">Bryan Liles</a> mentioned the above article by ReinH in <a
href="http://vimeo.com/4202549">one of his videos</a>. I highly recommend giving it a read as it presents some interesting ideas.</p><p>Here&#8217;s an example. Recently I had a need to build an ecommerce site. <a
href="http://www.Spreehq.org" target="_blank">Spree</a> is a nice open source ecommerce system built on Rails&#8230; however, it does not suit my needs perfectly and when I started looking around the code, I found some code that could be refactored to act more effectively.</p><p>I like to commit often&#8230; sometimes a little too often. Sometimes I&#8217;ll make a change, commit it, do a browser check to see if it works, go back, fix any errors, commit again, and repeat the cycle. The result of my frequent committing is that I have a ton of tiny commits that others won&#8217;t really find useful following along. If they tried, they&#8217;d understand, but they&#8217;d waste a ton of time because the commits are small and often filled with errors that are fixed on the next 2 or 3 commits.</p><p>What should I do? The article by ReinH proposes an answer to the problem. Go check it out! Be sure to not be a passive blog reader. Please leave feedback on what you thought. It acts as fuel for bloggers.</p> ]]></content:encoded> <wfw:commentRss>http://railsnotes.com/442-git-workflow/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to checkout a branch from a remote git repo</title><link>http://railsnotes.com/70-how-to-checkout-a-branch-from-a-remote-git-repo/</link> <comments>http://railsnotes.com/70-how-to-checkout-a-branch-from-a-remote-git-repo/#comments</comments> <pubDate>Fri, 12 Dec 2008 17:56:52 +0000</pubDate> <dc:creator>Melvin Ram</dc:creator> <category><![CDATA[Git]]></category><guid
isPermaLink="false">http://railsnotes.wordpress.com/?p=70</guid> <description><![CDATA[Conversation from IRC #git channel melvinram: I am working on a new machine and I&#8217;ve got a git repo inside github. I&#8217;ve just pulled it down and it&#8217;s currently on the master branch. How do I get it to pull down branch xyz and have it checkout? Is it: git checkout -b xyz origin/xyz jnareb: [...]]]></description> <content:encoded><![CDATA[<p></p><h2>Conversation from IRC #git channel</h2><p><strong>melvinram: </strong>I am working on a new machine and I&#8217;ve got a git repo inside github. I&#8217;ve just pulled it down and it&#8217;s currently on the master branch. How do I get it to pull down branch xyz and have it checkout? Is it: git checkout -b xyz origin/xyz</p><p><strong>jnareb: </strong>melvinram: fetch, then either create tracking local branch reflecting remote-tracking branch, or directly checkout which would detach HEAD</p><p><strong>jnareb: </strong>melvinram: that is one solution, and I guess the one you would want; unless you want to only &#8220;take a look&#8221;</p><p><strong>jnareb: </strong>&#8220;git checkout -b branch remote/branch&#8221; (which creates local tracking branch), or &#8220;git checkout remote/branch&#8221; (which detaches HEAD -&gt; you are on &#8216;no branch&#8217;)</p> ]]></content:encoded> <wfw:commentRss>http://railsnotes.com/70-how-to-checkout-a-branch-from-a-remote-git-repo/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 4/16 queries in 0.032 seconds using disk

Served from: railsnotes.com @ 2010-09-09 07:17:36 -->