<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kmeng's Blog</title>
	<atom:link href="http://kmeng.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kmeng.wordpress.com</link>
	<description>Ke Meng's life and study</description>
	<lastBuildDate>Thu, 06 Oct 2011 14:38:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kmeng.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kmeng's Blog</title>
		<link>http://kmeng.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kmeng.wordpress.com/osd.xml" title="Kmeng&#039;s Blog" />
	<atom:link rel='hub' href='http://kmeng.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Fan control on DELL Inspiron 6000</title>
		<link>http://kmeng.wordpress.com/2011/10/06/fan-control-on-dell-inspiron-6000/</link>
		<comments>http://kmeng.wordpress.com/2011/10/06/fan-control-on-dell-inspiron-6000/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 14:38:28 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=20</guid>
		<description><![CDATA[Problem: Fan always running on Archlinux with Openbox Fix: # yaourt -S i8kutils i8kmon # sudo modprobe i8k (or add to /etc/rc.conf) # i8kmon -a -d (or add to ~/.config/openbox/autostart.sh) For CPU frequency control, please see: https://wiki.archlinux.org/index.php/CPU_Frequency_Scaling<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=20&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Problem:</p>
<p>Fan always running on Archlinux with Openbox</p>
<p>Fix:</p>
<p># yaourt -S i8kutils i8kmon</p>
<p># sudo modprobe i8k (or add to /etc/rc.conf)</p>
<p># i8kmon -a -d (or add to ~/.config/openbox/autostart.sh)</p>
<p>For CPU frequency control, please see:</p>
<p>https://wiki.archlinux.org/index.php/CPU_Frequency_Scaling</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=20&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2011/10/06/fan-control-on-dell-inspiron-6000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
		<item>
		<title>Archlinux ibus configuration</title>
		<link>http://kmeng.wordpress.com/2010/07/10/archlinux-ibus-configuration/</link>
		<comments>http://kmeng.wordpress.com/2010/07/10/archlinux-ibus-configuration/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 00:53:45 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=15</guid>
		<description><![CDATA[$ cat .xprofile GTK_IM_MODULE=&#8221;xim&#8221; QT_IM_MODULE=&#8221;xim&#8221; XIM_PROGRAM=&#8221;/usr/bin/ibus&#8221; XIM=&#8221;ibus&#8221; XMODIFIERS=&#8221;@im=ibus&#8221; export GTK_IM_MODULE QT_IM_MODULE XIM_PROGRAM XIM XMODIFIERS /* 选词框的光标跟随 */ $ cat /etc/gtk-2.0/gtk.immodules &#8220;/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so&#8221; &#8220;ibus&#8221; &#8220;X Input Method&#8221; &#8220;gtk20&#8243; &#8220;/usr/share/locale&#8221; &#8220;en:zh&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=15&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>$ </strong><strong>cat .xprofile</strong><br />
GTK_IM_MODULE=&#8221;xim&#8221;<br />
QT_IM_MODULE=&#8221;xim&#8221;<br />
XIM_PROGRAM=&#8221;/usr/bin/ibus&#8221;<br />
XIM=&#8221;ibus&#8221;<br />
XMODIFIERS=&#8221;@im=ibus&#8221;<br />
export GTK_IM_MODULE QT_IM_MODULE XIM_PROGRAM XIM XMODIFIERS</p>
<p>/* 选词框的光标跟随 */<br />
<strong>$ cat /etc/gtk-2.0/gtk.immodules</strong><br />
&#8220;/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so&#8221;<br />
&#8220;ibus&#8221; &#8220;X Input Method&#8221; &#8220;gtk20&#8243; &#8220;/usr/share/locale&#8221; &#8220;en:zh&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=15&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2010/07/10/archlinux-ibus-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
		<item>
		<title>My Git Document</title>
		<link>http://kmeng.wordpress.com/2010/01/26/my-git-document/</link>
		<comments>http://kmeng.wordpress.com/2010/01/26/my-git-document/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 01:12:30 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=11</guid>
		<description><![CDATA[Create Git Server We will use Debian Linux as an example to setup Git server. Other system is similar. There are many methods to set up Git server. For example, git can be remotely accessed by “git://”, “http[s]://”, “ssh://” , “rsync://” and so on. Here we will setup an git server wich can be accessed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=11&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Arial", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Microsoft YaHei"; font-size: 16pt } 		H1.ctl { font-family: "Microsoft YaHei"; font-size: 16pt } 		H2 { margin-bottom: 0.08in } 		H2.western { font-family: "Arial", sans-serif; font-size: 14pt; font-style: italic } 		H2.cjk { font-family: "Microsoft YaHei"; font-size: 14pt; font-style: italic } 		H2.ctl { font-family: "Microsoft YaHei"; font-size: 14pt; font-style: italic } --></p>
<h1>Create Git Server</h1>
<p>We will use Debian Linux as an example to setup Git server. Other system is similar. There are many methods to set up Git server. For example, git can be remotely accessed by “git://”, “http[s]://”, “ssh://” , “rsync://” and so on. Here we will setup an git server wich can be accessed by using “git:// ”.</p>
<h2>Install and initialize Git server</h2>
<p>Install “git” and “git-daemon-run” by the commad:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># apt-get install git-core</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># apt-get install git-daemon-run</em></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;"><em>Cre</em></span></span><span style="color:#000000;"><span style="font-size:small;">ate </span></span><span style="color:#000000;">“</span>git” directory in home directory and then create source code directory. In my computer, the source code directory is “/home/kmeng/git/madwifi4099”.</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cd ~</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># mkdir git</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cd git</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>#mkdir madwifi4099</em></span></span></p>
<p>Initialize git depository:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cd madwifi4099</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git-init-db</em></span></span></p>
<p>“git-daemon-run” is used to start up the git daemon. Modify the script for git-daemon:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cat /etc/sv/git-daemon/run</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>#!/bin/sh<br />
exec 2&gt;&amp;1<br />
echo ‘git-daemon starting.’<br />
exec git-daemon –verbose –export-all –base-path=/path/to/git/</em></span></span></p>
<p><span style="color:#000000;">“<span style="font-size:small;">/path/to/git” is the directory of git depository, which is “/home/kmeng/git” in my computer.</span></span></p>
<h2>Commit original madwifi code</h2>
<p>Then copy source code to madwifi4099 directory.</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cp ~/madwifi-trunk-r4099-20090929 madwifi4099</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git add *</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git commit</em></span></span></p>
<h1>Use Git client</h1>
<h2>Configure author information</h2>
<p>Setup local information by editing the “gitconfig” file or using “git config” command. Following is the example of my “gitconfig” file.</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cat ~/.gitconfig</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>[user] </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em> email = kmeng@crimson.ua.edu </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em> name = Ke Meng</em></span></span></p>
<p>You may also customize your git by adding other tags.</p>
<h2>Simple usage to modify code and commit</h2>
<p>Here I just talk about the simplest use of git. We only get the code from the git server, modify the code and then commit the modification. The advanced uses will be explained later.</p>
<p>Clone the git depository from git server:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git clone git://w4net.dyndns.org/madwifi4099</em></span></span></p>
<p>After modifying the code, use “git add” to add all file contents to the index</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git add filenames</em></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">Then use “git commit” record changes to the repository (Make sure to write commit log):</span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git commit</em></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">If you didn&#8217;t add new files, you can combine “git add” and “git commit” together by:</span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git commit -a</em></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">Then you can use “git format-patch” to generate the patch file for this commit:</span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git format-patch HEAD^</em></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">To apply the patch file, use:</span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git am &lt; 00001-patchfile.patch</em></span></span></p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --><span style="color:#000000;"><span style="font-size:small;">When there are errors of am, we can use</span></span></p>
<p><span style="color:#0000ff;"><span style="font-family:Times New Roman,serif;"><span style="font-size:x-small;"><em>#</em></span></span></span><code><span style="color:#0000ff;"><span style="font-family:Times New Roman,serif;"><span style="font-size:x-small;"><em> git apply --reject </em></span></span></span></code><em><span style="color:#0000ff;"><span style="font-family:Times New Roman,serif;"><span style="font-size:x-small;"><em>00001-patchfile.patch</em></span></span></span></em></p>
<p><code><span style="color:#000000;"><span style="font-family:Times New Roman,serif;"><span style="font-size:small;">This will commit the conflict-free file and show the errors such as "error: while searching for: "</span></span></span></code></p>
<p><code><span style="color:#000000;"><span style="font-family:Times New Roman,serif;"><span style="font-size:small;">Then we can manually modify the conflict file and use the command to add</span></span></span></code></p>
<p><em><span style="color:#0000ff;"><span style="font-family:Times New Roman,serif;"><span style="font-size:x-small;"># git add filename</span></span></span></em></p>
<p><code><span style="color:#000000;"><span style="font-family:Times New Roman,serif;"><span style="font-size:small;">In the end:</span></span></span></code></p>
<p><em><span style="color:#0000ff;"><span style="font-family:Times New Roman,serif;"><span style="font-size:x-small;"># git am &#8211;resolved</span></span></span></em></p>
<h1>Configure git mail</h1>
<p>After generating the patch file, we will use “msmtp” as the SMTP client to send the patch. In my Archlinux system, the msmtp can be installed by the command:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># pacman -S msmtp</em></span></span></p>
<p>Then configure “msmtp” by editing the configure file:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># cat ~/.msmtprc</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>account UA<br />
host smtp.gmail.com<br />
port 587<br />
auth on<br />
tls on<br />
from kmeng@crimson.ua.edu<br />
user kmeng@crimson.ua.edu<br />
password ******</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>account default : UA</em></span></span></p>
<p>The file contains your password. So wet the mode of .msmtprc to 600, which only allow yourself to access the file:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># chmod 600 ~/.msmtprc</em></span></span></p>
<p>Configure git to send mail by using “msmtp “</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git config &#8211;global sendemail.smtpserver /usr/bin/msmtp</em></span></span></p>
<p>Then use “git send-mail” to send the patch file:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git send-email &#8211;to kmeng@cs.ua.edu 000*.patch</em></span></span></p>
<h1>Advanced usage of Git</h1>
<h2>There status in Git</h2>
<p>There are three commit status defined as tree, index and commit in git.</p>
<p><span style="color:#0000ff;">Tree</span>: When modifying the code, they only take effect in the tree. The index and commit are keep the old version.</p>
<p><span style="color:#0000ff;">Index</span>: After modification, we use the command of “git add” to  add modified files to the index. The changes have not been recorded right now.</p>
<p><span style="color:#0000ff;">Commit</span>: Record changes to the repository.</p>
<h2>Constants in Git</h2>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>HEAD: The latest commit state</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>HEAD^ (HEAD~1): The parent of HEAD </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>HEAD^^ (HEAD~2): The parent of HEAD^^ </em></span></span></p>
<p><span style="color:#0000ff;">…<span style="font-size:x-small;"><em>&#8230;</em></span></span></p>
<p>I think we know why HEAD^ is used to generate patch right now.</p>
<h2>git diff</h2>
<p>Show changes between commits, commit and working tree, etc.</p>
<p><span style="color:#0000ff;">git diff: the difference between tree and index</span>. When we modified the code and didn&#8217;t use “git add” to add the files to the index, this command may be used to show our modification. After “git add”, “git diff” will not show any difference.</p>
<p><span style="color:#0000ff;">git diff HEAD: show the difference between tree and commit depository.</span> HEAD is the latest commit. So after “git add”, we can use this command to show the difference between current working tree and the commit depository.</p>
<p><span style="color:#0000ff;">git diff &#8211;cached: the difference between index and commit depository.</span> The command will show the modification so long as you haven&#8217;t commit the changes to depository.</p>
<h2>git reset</h2>
<p>Reset current HEAD to the specified state</p>
<p><span style="color:#0000ff;">git reset &#8211;soft</span>: reset commit information. The working tree and index are not been reset. This also means resume to the state before “git commit” after “git add”. This command can be used when you only want to modify the commit log. You need do the “git commit” when you want to recommit.</p>
<p><span style="color:#0000ff;">git reset &#8211;mixed:</span> reset commit and index. The working tree is not been reset. This also means resume to the state before “git add” and keep the changes in working tree. This command can be used when you only want to modify some code and then continue to commit. You need do both “git add” and “git commit” when you want to recommit the changes.</p>
<p><span style="color:#0000ff;">git reset &#8211;hard </span><span style="color:#000000;">: reset commit, index and tree. Completely reset current HEAD to specified state. Think clearly before all your work after last commit being cleaned.</span></p>
<p><span style="color:#0000ff;">git reset&#8211; filename</span>: reset a single file in the index. Suppose you have added a file to your index, but later decide you do not want to add it to your commit. You can remove the file from the index while keeping your changes with git reset.</p>
<h2>git branch</h2>
<p>There is only one branch called “master” after clone the git depository from the git server. We can create new branches to test our new modification. After testing, we can update the master branch by merge, pull or even patch.</p>
<p>“git branch” is used to list, create, or delete branches. To create a new branch name “kmeng”:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git branch kmeng</em></span></span></p>
<p>To checkout to the new branch:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git checkout kmeng</em></span></span></p>
<p>Or combine the create and checkout together by the command:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git checkout -b kmeng</em></span></span></p>
<p>Merge “kmeng” branch to the current branch:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git merge kmeng</em></span></span></p>
<p>Pull “kmeng” branch to current branch:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git pull . kmeng</em></span></span></p>
<p>Pull branch from other depository to current branch</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git pull  /home/kmeng/other/git/depository</em></span></span></p>
<h2>git rebase</h2>
<p>Forward-port local commits to the updated upstream head. We will use the example in the git help to explain the command.</p>
<p>Assume the following history exists and the current branch is &#8220;topic&#8221;:</p>
<p>A&#8212;B&#8212;C topic</p>
<p>/</p>
<p>D&#8212;E&#8212;F&#8212;G master</p>
<p>From this point, the result of either of the following commands:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git rebase master </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git rebase master topic</em></span></span></p>
<p>would be:</p>
<p>A&#8217;&#8211;B&#8217;&#8211;C&#8217; topic</p>
<p>/</p>
<p>D&#8212;E&#8212;F&#8212;G master</p>
<p>Git rebase also has other complicated usage which will not be talked here.</p>
<h2>git log</h2>
<p>Show commit log. For example:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git log</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>commit f6f84537cdd88953ada7c49753e1ac48ef2275aa </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>Author: Ke Meng &lt;kmeng1219@gmail.com&gt; </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em>Date:   Wed Jan 13 19:55:11 2010 -0600 </em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em> </em></span></span></p>
<p><span style="color:#0000ff;"> <span style="font-size:x-small;"><em>kmeng add dos frame transmit </em></span></span></p>
<h2>git show</h2>
<p>Show various types of objects</p>
<p>Show the commit log and patch of one commit:</p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git show  f6f84537cdd88953ada7c49753e1ac48ef2275aa</em></span></span></p>
<p><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git show HEAD^</em></span></span></p>
<h2><em>git whatchanged </em></h2>
<p><span style="color:#000000;"><span style="font-size:small;">Show logs with difference each commit introduces</span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">You can show the changes between two commits or two branches.</span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;"><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git whatchanged master..kmeng</em></span></span></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;"><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git whatchanged HEAD^^..HEAD</em></span></span></span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;">This command can also show detailed textual diffs by “-p” options:</span></span></p>
<p><span style="color:#000000;"><span style="font-size:small;"><span style="color:#0000ff;"><span style="font-size:x-small;"><em># git whatchanged -p master..kmeng</em></span></span></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=11&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2010/01/26/my-git-document/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
		<item>
		<title>git study</title>
		<link>http://kmeng.wordpress.com/2009/12/21/git-study/</link>
		<comments>http://kmeng.wordpress.com/2009/12/21/git-study/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:17:58 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=7</guid>
		<description><![CDATA[Several items about git: git server: git-core git-daemon-run #mkdir /git #cd /git/ #git-init-db #cp files to /git/ #apt-get install git-daemon #vi /etc/sv/git-daemon/run #!/bin/sh exec 2&#62;&#38;1 echo &#8216;git-daemon starting.&#8217; exec git-daemon &#8211;verbose &#8211;export-all &#8211;base-path=/home/kmeng/git/ git client: git config sendemail.smtpserver /usr/bin/msmtp git config &#8211;global sendemail.cc &#8220;kmeng1219@gmail.com&#8221; msmtp ~/.msmtprc 09     account gmail 10     host smtp.gmail.com 11     port 587 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=7&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Several items about git:</p>
<p>git server:</p>
<p>git-core</p>
<p>git-daemon-run</p>
<p>#mkdir /git</p>
<p>#cd /git/</p>
<p>#git-init-db</p>
<p>#cp files to /git/</p>
<p>#apt-get install git-daemon</p>
<p>#vi /etc/sv/git-daemon/run</p>
<p>#!/bin/sh<br />
exec 2&gt;&amp;1<br />
echo &#8216;git-daemon starting.&#8217;<br />
exec git-daemon &#8211;verbose &#8211;export-all &#8211;base-path=/home/kmeng/git/</p>
<p>git client:</p>
<p>git config sendemail.smtpserver /usr/bin/msmtp<br />
git config &#8211;global sendemail.cc &#8220;kmeng1219@gmail.com&#8221;<br />
msmtp</p>
<p>~/.msmtprc</p>
<p>09     account gmail<br />
10     host smtp.gmail.com<br />
11     port 587<br />
12     auth on<br />
13     tls on<br />
14     from kmeng1219@gmail.com<br />
15     user &#8220;kmeng1219&#8243;<br />
16     password &#8220;******&#8221;<br />
17<br />
18<br />
19 # Default account<br />
20 account default : gmail</p>
<p>chmod 600 ~/.msmtprc<br />
~/.mailrc</p>
<p>set sendmail=&#8221;/usr/bin/msmtp&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=7&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2009/12/21/git-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
		<item>
		<title>I have a baby boy</title>
		<link>http://kmeng.wordpress.com/2009/06/21/i-have-a-baby-boy/</link>
		<comments>http://kmeng.wordpress.com/2009/06/21/i-have-a-baby-boy/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 18:15:49 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=5</guid>
		<description><![CDATA[My wife gave birth to the baby on June 2 by C-section. The baby was named Daniel. My wife was discharged from DCH hospital on June 6. Daniel had the wet lung disease and stayed in the DCH untill June 13.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=5&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My wife gave birth to the baby on June 2 by C-section. The baby was named Daniel. My wife was discharged from DCH hospital on June 6. Daniel had the wet lung disease and stayed in the DCH untill June 13.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=5&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2009/06/21/i-have-a-baby-boy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
		<item>
		<title>Create wordpress blog on May 5 2009</title>
		<link>http://kmeng.wordpress.com/2009/05/06/create-wordpress-blog-on-may-5-2009/</link>
		<comments>http://kmeng.wordpress.com/2009/05/06/create-wordpress-blog-on-may-5-2009/#comments</comments>
		<pubDate>Wed, 06 May 2009 04:44:29 +0000</pubDate>
		<dc:creator>kmeng</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kmeng.wordpress.com/?p=3</guid>
		<description><![CDATA[I choose wordpress as my blog today.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=3&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I choose wordpress as my blog today.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kmeng.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kmeng.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kmeng.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kmeng.wordpress.com&amp;blog=7638424&amp;post=3&amp;subd=kmeng&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kmeng.wordpress.com/2009/05/06/create-wordpress-blog-on-may-5-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/080f861888bade3f24333211cb62ce93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kmeng</media:title>
		</media:content>
	</item>
	</channel>
</rss>
