<?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>Acelan's Life &#187; git</title>
	<atom:link href="http://blog.acelan.idv.tw/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.acelan.idv.tw</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 07 Sep 2011 03:31:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apply patch</title>
		<link>http://blog.acelan.idv.tw/2009/11/apply-patch/</link>
		<comments>http://blog.acelan.idv.tw/2009/11/apply-patch/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 03:47:53 +0000</pubDate>
		<dc:creator>AceLan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://blog.acelan.idv.tw/?p=47</guid>
		<description><![CDATA[PATCH=patch_filename ; git am $PATCH &#124;&#124; (git apply --reject $PATCH ; find -name *.rej)
It&#8217;s done, if no .rej files be produced.
If git am failed, it&#8217;ll try to apply the other successful part and produce the .rej files to indicate the failed part.
Edit the failed files then, and using git status to make sure how many [...]]]></description>
			<content:encoded><![CDATA[<p><code>PATCH=patch_filename ; git am $PATCH || (git apply --reject $PATCH ; find -name *.rej)</code></p>
<p>It&#8217;s done, if no .rej files be produced.</p>
<p>If <code>git am</code> failed, it&#8217;ll try to apply the other successful part and produce the .rej files to indicate the failed part.</p>
<p>Edit the failed files then, and using <code>git status</code> to make sure how many files infected and using <code>git add files</code> to add them or using <code> git add -u</code> to add all not updated files.</p>
<p>Finally, <code>git am --resolved</code></p>
<p>Note for the zsh user. (2010/01/12)<br />
I changed my default shell to zsh recently and found the apply patch command is broken. Although zsh claim that it&#8217;s compatible with bash, there are still some difference. But the good news is we can overcome this problem by adding one more line in the .zshrc<br />
<code>setopt GLOB_SUBST</code><br />
More detail, please read <a href="http://zsh.sourceforge.net/Guide/zshguide02.html#l14">this</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acelan.idv.tw/2009/11/apply-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What a stupid thing I did!!</title>
		<link>http://blog.acelan.idv.tw/2009/10/what-a-stupid-thing-i-did/</link>
		<comments>http://blog.acelan.idv.tw/2009/10/what-a-stupid-thing-i-did/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 03:39:43 +0000</pubDate>
		<dc:creator>AceLan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://blog.acelan.idv.tw/?p=30</guid>
		<description><![CDATA[I&#8217;ve been curious who made the test_branch_1 branch on the ubuntu git tree for a long time. And today I checkout that branch and see the amazing log.
acelan@acelan-nb:~/workspace/ubuntu-karmic$ git branch -r             
  origin/HEAD -> origin/master
  origin/arm
  origin/ec2
  origin/fsl-imx51
  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been curious who made the test_branch_1 branch on the ubuntu git tree for a long time. And today I checkout that branch and see the amazing log.</p>
<p><code>acelan@acelan-nb:~/workspace/ubuntu-karmic$ git branch -r</code>             </p>
<blockquote><p>  origin/HEAD -> origin/master<br />
  origin/arm<br />
  origin/ec2<br />
  origin/fsl-imx51<br />
  origin/master<br />
  origin/mvl-dove<br />
  origin/netbook<br />
  origin/patches-that-need-love<br />
  origin/pending-upstream-patches<br />
  origin/test_branch_1</p></blockquote>
<p><code>acelan@acelan-nb:~/workspace/ubuntu-karmic$ git checkout -b test origin/test_branch_1</code></p>
<blockquote><p>Checking out files: 100% (9533/9533), done.<br />
Branch test set up to track remote branch test_branch_1 from origin.<br />
Switched to a new branch &#8216;test&#8217;</p></blockquote>
<p><code>acelan@acelan-nb:~/workspace/ubuntu-karmic$ git log</code></p>
<blockquote><p>commit a2c978c3ffb96982b3876b37c0a21fcc787234bc<br />
Author: AceLan Kao ＜acelan@ooo.xxx.com><br />
Date:   Fri Jun 12 13:42:45 2009 +0800             </p>
<p>    only for git test</p>
<p>commit fba4b54f8f16a11ff3e57b7ac76d437b5d831695<br />
Author: AceLan ＜acelan@acelan-nb.(none)><br />
Date:   Tue Jun 9 16:17:23 2009 +0800</p>
<p>    UBUNTU: [Upstream]</p>
<p>    Signed-off-by: AceLan ＜acelan@acelan-nb.(none)></p></blockquote>
<p>It was my second day, and I didn&#8217;t know too much about git. Of course, the branch was already been deleted, and nobody will know what I had did. :p</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acelan.idv.tw/2009/10/what-a-stupid-thing-i-did/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My git commands backup</title>
		<link>http://blog.acelan.idv.tw/2009/10/my-git-commands-backup/</link>
		<comments>http://blog.acelan.idv.tw/2009/10/my-git-commands-backup/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 07:26:50 +0000</pubDate>
		<dc:creator>AceLan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://blog.acelan.idv.tw/?p=20</guid>
		<description><![CDATA[On a new installed machine, you have to add your info in the ~/.gitconfig
git config --add user.name "AceLan Kao"
git config --add user.email acelan.kao@ccc.ccc

Clone Jaunty kernel and add my public repository, so that I can publish my modification to public git tree.
git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-jaunty.git
git remote add zinc git+ssh://zinc.ubuntu.com/srv/kernel.ubuntu.com/git/acelan/acelan-jaunty.git
NOTE. The reference git tree(ex. linux-2.6) shouldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>On a new installed machine, you have to add your info in the ~/.gitconfig<br />
<code>git config --add user.name "AceLan Kao"<br />
git config --add user.email acelan.kao@ccc.ccc<br />
</code></p>
<p>Clone Jaunty kernel and add my public repository, so that I can publish my modification to <a href="http://kernel.ubuntu.com/git">public git tree</a>.<br />
<code>git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-jaunty.git<br />
git remote add zinc git+ssh://zinc.ubuntu.com/srv/kernel.ubuntu.com/git/acelan/acelan-jaunty.git</code><br />
NOTE. The reference git tree(ex. linux-2.6) shouldn&#8217;t be removed under any circumstances, or the reference object will disappear and the git tree will become unusable. The file <code>.git/objects/info/alternates</code> will record the referenced git tree, try to specify an available one, if you removed the original reference tree accidentally.</p>
<p><span id="more-20"></span></p>
<p>We usually cherry pick upstream kernel commit, this is the command.<br />
<code>git cherry-pick -s -e -x aa1812b3e</code></p>
<p>And the request letter format for cherry pick.<br />
<code>git request-pull \<br />
           <lastest SHA before your commit> \<br />
           git://kernel.ubuntu.com/<your_id_on_zinc>/my-jaunty.git \<br />
           > new_branch_1-request-pull.txt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acelan.idv.tw/2009/10/my-git-commands-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

