<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd">

<channel>
	<title>The Codebelay Blog &#187; git</title>
	<atom:link href="http://www.codebelay.com/blog/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codebelay.com/blog</link>
	<description>Safely Reach New Tech Heights Through Our Startup Insights</description>
	<lastBuildDate>Wed, 25 Jan 2012 19:12:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Git: How to Cherry Pick Commits and Package them Under a Tag</title>
		<link>http://www.codebelay.com/blog/2009/07/08/git-how-to-cherry-pick-commits-and-package-them-under-a-tag/</link>
		<comments>http://www.codebelay.com/blog/2009/07/08/git-how-to-cherry-pick-commits-and-package-them-under-a-tag/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 06:03:21 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[command-line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=603</guid>
		<description><![CDATA[I&#8217;ve pretty much come to rely on git to pull me out of any bad jams in the chaotic environment I work in. One thing I&#8217;ve had to learn to do is cherry pick commits and package them under a tag in git. Here&#8217;s how to do it if you were working with my newLISP [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve pretty much come to rely on git to pull me out of any bad jams in the chaotic environment I work in.</p>
<p>One thing I&#8217;ve had to learn to do is cherry pick commits and package them under a tag in git.</p>
<p>Here&#8217;s how to do it if you were working with my newLISP project called Sitebeagle:</p>
<p>fork sitebeagle on <a href="http://github.com/barce/sitebeagle/tree/master" target="_blank">this page</a></p>
<p>cd sitebeagle</p>
<p>git fetch &#8211;tags</p>
<p>git checkout 8f5bb33a771f7811d21b8c96cec67c28818de076</p>
<p>git checkout -b sample_cherry_pick</p>
<p>git cherry-pick 22aab7</p>
<p>git cherry-pick b1334775</p>
<p>git diff sample_cherry_pick..master</p>
<p>git tag leaving_out_one_commit</p>
<p>git push origin &#8211;tags</p>
<p>At this point, you should have a tagged branch that doesn&#8217;t have the commit with the change to the &#8220;2nd file.&#8221; The diff should look exactly like this:</p>
<p>diff &#8211;git a/test.lsp b/test.lsp<br />
index 9cf1667..158b625 100755<br />
&#8212; a/test.lsp<br />
+++ b/test.lsp<br />
@@ -1,6 +1,7 @@<br />
 #!/usr/bin/newlisp</p>
<p> ; test tag test_a<br />
+; cherry pick test 2</p>
<p> (load &#8220;sitebeagle.lsp&#8221;)<br />
 (load &#8220;twitter.lsp&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/07/08/git-how-to-cherry-pick-commits-and-package-them-under-a-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Around the Politics of Subversion with git</title>
		<link>http://www.codebelay.com/blog/2008/10/22/getting-around-the-politics-of-subversion-with-git/</link>
		<comments>http://www.codebelay.com/blog/2008/10/22/getting-around-the-politics-of-subversion-with-git/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 17:51:30 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=308</guid>
		<description><![CDATA[This is the nightmare scenario. You are working with a coder who overwrites your changes in subversion. You&#8217;ve told this coder once, twice, three times, &#8220;Hey, please don&#8217;t do that. Hey, let&#8217;s talk about your changes before you commit them.&#8221; But this coder for some reason thinks that he or she is the gift of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This is the nightmare scenario. You are working with a coder who overwrites your changes in subversion. You&#8217;ve told this coder once, twice, three times, &#8220;Hey, please don&#8217;t do that. Hey, let&#8217;s talk about your changes before you commit them.&#8221;</p>
<p>But this coder for some reason thinks that he or she is the gift of the gods when it comes to coding, and continues to overwrite your changes.</p>
<p>This is where git comes in. If I had learned about this feature of git and the idea of accepting or rejecting changes in git sooner, I would have avoided the whole nightmare of re-comitting code and lengthy merge debates.</p>
<p>Most projects you work won&#8217;t involve the worst case above. Most of the time, there will be a great developing rule that says never commit bugs into subversion. But whenever you have to re-factor code and commit each line, branching and then later merging can be an issue in subversion, and it&#8217;s slow too.</p>
<p>On a project that I&#8217;m working on now the client wants only good code in svn which is great, and so I&#8217;m using git with svn. I got this idea thanks to <a href="http://felocity.org/">Jakob Heuser</a>. Thanks, Jakob!!!!</p>
<p>This is where git comes in. Here&#8217;s a quick cheat sheet and it assumes you are using <a href="https://github.com/">GitHub</a>:</p>
<div style="background: #000; color: #fff; padding: 5px 5px 5px 5px;">
mkdir newlispoauth<br />
cd newlispoauth/<br />
git init<br />
touch README<br />
git add README<br />
git commit -m &#8216;first commit&#8217;<br />
git remote add origin git@github.com:barce/newlispoauth.git<br />
git push origin master
</div>
<p>Now we have to pull in changes from subversion:</p>
<div style="background: #000; color: #fff; padding: 5px 5px 5px 5px;">
mate .git/config
</div>
<p>In the config file add something that looks like this:</p>
<div style="background: #000; color: #fff; padding: 5px 5px 5px 5px;">
[svn-remote "newlispoauth/trunk"]<br />
&nbsp;&nbsp;url = http://codebelay.com/newlispoauth/trunk<br />
&nbsp;&nbsp;fetch = :refs/remotes/newlispoauth/trunk
</div>
<p>Now we&#8217;re gonna fetch the subversion repo:</p>
<div style="background: #000; color: #fff; padding: 5px 5px 5px 5px;">
git-svn fetch newlispoauth/trunk<br />
git checkout -b local-svn/trunk newlispoauth/trunk<br />
git svn rebase<br />
git checkout master<br />
git merge local-svn/trunk<br />
git mergetool # if there are conflicts with the README file above<br />
git add README # if you had to make changes with the mergetool<br />
git commit<br />
git push origin master
</div>
<p>Now you are working with &#8220;master&#8221; and &#8220;local-svn/trunk&#8221;.</p>
<p>&#8220;master&#8221; is for your changes to share with your team on git-hub<br />
&#8220;local-svn/trunk&#8221; is for you and where you push changes to subversion.</p>
<p>You basically pull in changes from newlispoauth/trunk and do your work in local-svn/trunk.</p>
<p>Let&#8217;s put the changes in master into &#8220;newlispoauth/trunk&#8221; and commit those changes to subversion:</p>
<div style="background: #000; color: #fff; padding: 5px 5px 5px 5px;">
git checkout local-svn/trunk # you did commit your changes in origin right?<br />
git merge master<br />
git-svn dcommit
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2008/10/22/getting-around-the-politics-of-subversion-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.436 seconds -->

