<?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>右舷 &#187; git</title>
	<atom:link href="http://www.laihj.net/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laihj.net</link>
	<description>list(linux,emacs,旅行,读书,andriod)</description>
	<lastBuildDate>Tue, 20 Jul 2010 01:52:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[git笔记]git的文件状态与改变状态</title>
		<link>http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/</link>
		<comments>http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 02:27:28 +0000</pubDate>
		<dc:creator>laihj</dc:creator>
				<category><![CDATA[负暄琐话]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.laihj.net/?p=649974</guid>
		<description><![CDATA[
git库所在的文件夹(即.git所在的文件夹)中的文件大抵就是这四种状态。
untracked:未跟踪，此文件在文件夹中，但并没有加入git库，不参与版本控制。 通过&#8221;git add&#8221;,&#8221;git commit&#8221;可将它置入跟踪库。
unmodify：文件已经库中，未修改，即版本库中的文件快照内容与文件夹中完全一致。这种类型的文件有两个去处，如果它被修改，而成为modified。如果使用&#8221;git rm&#8221;移出版本库，则成为untracked文件。
modified：文件已修改，仅仅是修改，并没有进行其它操作。这个文件也有两个去处，通过&#8221;git add&#8221;可进入暂存(staged)状态，使用&#8221;git checkout&#8221;则丢弃修改，返因到unmodify状态。这个checkout很好理解，就是取出库中文件，覆盖当前文件吧。
staged：暂存状态。执得&#8221;git commit&#8221;则将修改同步到库中，这时库中的文件与本地文件又一致了，于是文件是unmodify状态。执行&#8221;git reset HEAD filenam&#8221;取消暂存，文件状态变为modified。
参考：
pro git
Related Posts0Recent Commentslaihj : 不，是git add.
git commit是下一个，从staged到unmodify.
lxfancy : "这个文件也有两个去处，通过”git add”可进入暂存(staged)状态，"
这里git ad...
laihj : emacs
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<div id="attachment_649977" class="wp-caption alignnone" style="width: 547px"><img class="size-full wp-image-649977" title="git" src="http://www.laihj.net/wp-content/uploads/2009/12/git.png" alt="git file" width="537" height="328" /><p class="wp-caption-text">git file</p></div>
<p>git库所在的文件夹(即.git所在的文件夹)中的文件大抵就是这四种状态。</p>
<p>untracked:未跟踪，此文件在文件夹中，但并没有加入git库，不参与版本控制。 通过&#8221;git add&#8221;,&#8221;git commit&#8221;可将它置入跟踪库。</p>
<p>unmodify：文件已经库中，未修改，即版本库中的文件快照内容与文件夹中完全一致。这种类型的文件有两个去处，如果它被修改，而成为modified。如果使用&#8221;git rm&#8221;移出版本库，则成为untracked文件。</p>
<p>modified：文件已修改，仅仅是修改，并没有进行其它操作。这个文件也有两个去处，通过&#8221;git add&#8221;可进入暂存(staged)状态，使用&#8221;git checkout&#8221;则丢弃修改，返因到unmodify状态。这个checkout很好理解，就是取出库中文件，覆盖当前文件吧。</p>
<p>staged：暂存状态。执得&#8221;git commit&#8221;则将修改同步到库中，这时库中的文件与本地文件又一致了，于是文件是unmodify状态。执行&#8221;git reset HEAD filenam&#8221;取消暂存，文件状态变为modified。</p>
<p>参考：<br />
<a href="http://progit.org/book/zh/">pro git</a></p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="" >laihj</a> : <a class="comment_content" href="http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/#comment-71" title="View the entire comment by laihj" >不，是git add.
git commit是下一个，从staged到unmodify.</a></li>
<li><a class="commentor" href="" >lxfancy</a> : <a class="comment_content" href="http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/#comment-66" title="View the entire comment by lxfancy" >"这个文件也有两个去处，通过”git add”可进入暂存(staged)状态，"
这里git ad...</a></li>
<li><a class="commentor" href="" >laihj</a> : <a class="comment_content" href="http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/#comment-61" title="View the entire comment by laihj" >emacs</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.laihj.net/2009/12/git%e7%ac%94%e8%ae%b0git%e7%9a%84%e6%96%87%e4%bb%b6%e7%8a%b6%e6%80%81%e4%b8%8e%e6%94%b9%e5%8f%98%e7%8a%b6%e6%80%81/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
