<?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>RubyFreaks &#187; Version Control</title>
	<atom:link href="http://rubyfreaks.com/category/version-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubyfreaks.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 13 May 2010 16:42:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Git- Fast Version Control System</title>
		<link>http://rubyfreaks.com/2009/09/24/git/</link>
		<comments>http://rubyfreaks.com/2009/09/24/git/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:36:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GIT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=117</guid>
		<description><![CDATA[  GIT     What is Git?     Git is a free &#038; open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git was initially designed and developed by Linus Torvalds for Linux kernel development. To install Git on Debian/Ubuntu based Linux distribution use apt-get [...]]]></description>
			<content:encoded><![CDATA[<p><strong>  GIT</strong><br />
   <br />
<strong>What is Git?</strong><br />
    Git is a free &#038; open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git was initially designed and developed by<a href="http://torvalds-family.blogspot.com/"> Linus Torvalds</a> for Linux kernel development.<br />
To install Git on <a href="http://www.debian.org/">Debian</a>/<a href="http://www.ubuntu.com/">Ubuntu</a> based Linux distribution use </p>
<pre> <strong>apt-get install git-core</strong> </pre>
<p>      </p>
<p>Run once to create your local work branch </p>
<pre><strong>git checkout -b <your branch name></strong> </pre>
<p>Then make changes and commit to local branch.</p>
<p>Commit good practices:</p>
<ul>
<li> If you commit with git-gui, please inspect diff of every file included in the commit. You should not modify or delete any files that are not part of logic changes related to a task.  <br/> If you do not have a gui program to commit, inspect diff from command line: git-status &#8211; check files that need to be added/removed and git-diff to inspect changed files. </li>
<li>Enter a good description for commit: first line should be a  summary up to 80 chars, other lines can contain more descriptive message, if commit is related to a ticket use re #ticket_number to automatically add a comment to the ticket with commit description. </li>
</ul>
<p>To push to repository:</p>
<pre><strong>rake git:push</strong></pre>
<p>this command will update code from remote repository and will rebase your work branch with master, merge master branch  and it will push your changes to remote server.</p>
<p>To update the code from central repository</p>
<pre><strong>rake git:update</strong></pre>
<pre><strong>git checkout master<br/>git checkout -b <ur branch name></strong> </pre>
<p>commit your changes and after push this branch to remote </p>
<pre><strong>git push origin <ur branch name></strong> </pre>
<ul>
<li>You want to copy one commit from other branch to current branch
<pre><strong>git checkout current_branch<br/>git cherry-pick sha_id_from_other_branch</strong><br/></pre>
<p>Using gitk: 
<ol>
<li> right click on current branch and click check out this branch from popup menu </li>
<li> click on commit from other branch, right-click and select Cherry-pick this commit </li>
</ol>
</li>
<li>You forget to add some files to previous commit:
<pre><strong>git reset --soft HEAD^<br/># do some changes, add files that you forget<br/>git commit -c ORIG_HEAD</strong><br/></pre>
<p>Using git-gui:
<ol>
<li>Click Amend radio button above text area for commit description </li>
<li>Add/remove files from commit </li>
<li>Commit new changes </li>
</ol>
</li>
</ul>
<p>    </p></div>
<p>You can find more information regarding the Git <a href="http://git-scm.com/">here</a>.<br />
You can also find some useful miscellaneous git tools <a href="http://git-wt-commit.rubyforge.org/">here</a></p>
<style type="text/css">
pre {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#BE1115  none repeat scroll 0 0;
font-size:11px;
color:#FFFFFF;
overflow:auto;
}</p>
</style>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/09/24/git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
