<?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>Git &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Sat, 10 Jul 2021 07:57:01 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>Git &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Git GUI &#8211; (4) fetch、merge、pull、解決衝突情況(conflict)</title>
		<link>https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/</link>
					<comments>https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 10:23:10 +0000</pubDate>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[TortoiseGit]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2737</guid>

					<description><![CDATA[<p>接續上篇文章 Git GUI &#8211; (3) branch、conflict、merge。 【六、取得最新檔案(fetch, merge, pull)】 在開發程式的時候，可能在同一時間有許多&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI &#8211; (4) fetch、merge、pull、解決衝突情況(conflict)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>接續上篇文章 <strong><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">Git GUI &#8211; (3) branch、conflict、merge</a></strong>。 </p>



<span id="more-2737"></span>



<h2 class="para wp-block-heading"><strong>【六、取得最新檔案(fetch, merge, pull)】</strong> </h2>



<p>在開發程式的時候，可能在同一時間有許多工程師做修改的動作，剛開始可以先用 fetch 指令來查看看遠端倉儲中是否有較新的檔案。如果有最新檔案，可以使用合併(merge)來將檔案合併到目前本地倉儲。fetch 跟 pull 的功能非常類似，fetch 負責檢查遠端倉儲中是否有更新版本的檔案，接著讓工程師手動合併檔案；而 pull 則是先呼叫 fetch 檢查有無新版本後，由系統自動做合併動作，也就是 pull = fetch + merge。遇到無法解決的衝突(conflict)才需要透過手動處理。 </p>



<p>開始改動檔案前先檢查是否有檔案版本是否有更新。滑鼠右鍵 -&gt; TortoiseGit -&gt; Fetch<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-JMSBQ2kkXUU/UNPUCReqFUI/AAAAAAAAHf8/5GAuWC_ktYo/image157.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-JMSBQ2kkXUU/UNPUCReqFUI/AAAAAAAAHf8/5GAuWC_ktYo/image157.jpg" alt="image157.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-ejA7RPFjviw/UNPUC_Gu3yI/AAAAAAAAHfg/bA-W55mzrRo/image159.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-ejA7RPFjviw/UNPUC_Gu3yI/AAAAAAAAHfg/bA-W55mzrRo/image159.jpg" alt="image159.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>「64f1f65..7c8a8af master&nbsp; -&gt;&nbsp; origin/master」表示有檔案更新(如上圖)，並且已經將檔案儲存在暫存區。下圖[up to date]則是表示目前本地倉儲中的檔案已經是最新版本(與遠端倉儲一致)。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-8mceavsPCZA/UNPUDrfYPAI/AAAAAAAAHfk/beNwZuCFcBE/image162.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-8mceavsPCZA/UNPUDrfYPAI/AAAAAAAAHfk/beNwZuCFcBE/image162.jpg" alt="image162.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>(此步驟目的在檢查版本差異，可跳過直接進入第5點合併差異)如果沒有版本更新就可以不用理會，若有版本更新要處理，可透過滑鼠右鍵「TortoiseGit」選單，接著點選「Diff with previous version」來查看有哪些內容的變更。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-dkteTTDBYBI/UNPUDvs_S-I/AAAAAAAAE9s/-30Nkp7g9qc/image170.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-dkteTTDBYBI/UNPUDvs_S-I/AAAAAAAAE9s/-30Nkp7g9qc/image170.png" alt="image170.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>點選「RefBrowse」設定要比較的來源檔案，將 Version 1 設定成遠端倉儲分支，Version 2 設定成本地倉儲分支。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-60xYPLn93Gk/UNPUD4EYU6I/AAAAAAAAE90/X1vqQg0WndY/image177.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-60xYPLn93Gk/UNPUD4EYU6I/AAAAAAAAE90/X1vqQg0WndY/image177.png" alt="image177.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-FDiiU4wIxA4/UNPUEBeAVSI/AAAAAAAAE94/x4TW26OiZGY/image179.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-FDiiU4wIxA4/UNPUEBeAVSI/AAAAAAAAE94/x4TW26OiZGY/image179.png" alt="image179.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>設定完 Ref 後，如下圖，下方的框框會顯示這兩個版本有哪些變動。(修改了README.txt，以及多了一個 newFile.txt 檔案。在檔案上點選滑鼠左鍵兩下，可以看到兩個版本的檔案內容比較。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-gd_QWR3etAk/UNPUEovwoHI/AAAAAAAAE-A/1ywzmBZ2jwc/image184.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-gd_QWR3etAk/UNPUEovwoHI/AAAAAAAAE-A/1ywzmBZ2jwc/image184.png" alt="image184.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-u2HYhwFNlQ0/UNPUFDiy0ZI/AAAAAAAAE-M/R2Zezt7R6PY/image186.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-u2HYhwFNlQ0/UNPUFDiy0ZI/AAAAAAAAE-M/R2Zezt7R6PY/image186.png" alt="image186.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>開始進行合併動作，滑鼠右鍵「TortoiseGit」選單 -&gt;「Merge…」，選擇要合併的分支，並填寫 Merge Message。如果沒有發生衝突，合併完成後會出現 Success 字樣。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-czkyoVIJF3E/UNPUFAiJB7I/AAAAAAAAE-I/znJeAK3Biog/image196.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-czkyoVIJF3E/UNPUFAiJB7I/AAAAAAAAE-I/znJeAK3Biog/image196.png" alt="image196.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-TxAzJehpiE8/UNPUFggJ5-I/AAAAAAAAE-Q/_hpTg7osbP0/image198.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-TxAzJehpiE8/UNPUFggJ5-I/AAAAAAAAE-Q/_hpTg7osbP0/image198.png" alt="image198.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>接著我們嘗試使用 pull 來更新並合併版本庫。滑鼠右鍵「TortoiseGit」選單 -&gt; 「Pull…」。選取遠端要 pull 的倉儲分支，出現 Success 的字樣表示成功合併。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-9Oi97smx1eU/UNPUF7fQfhI/AAAAAAAAHgA/MilpeLCHZsU/image206.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-9Oi97smx1eU/UNPUF7fQfhI/AAAAAAAAHgA/MilpeLCHZsU/image206.jpg" alt="image206.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-jcB0LThd5qM/UNPUFyOVpuI/AAAAAAAAHfo/vBk6QEPSQUw/image208.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-jcB0LThd5qM/UNPUFyOVpuI/AAAAAAAAHfo/vBk6QEPSQUw/image208.jpg" alt="image208.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<h2 class="para wp-block-heading"><strong>【七、衝突情況】</strong> </h2>



<p>衝突是使用版本控制經常遇到的情況，以下將介紹衝突處理方式。 </p>



<p>如下圖，當 push 檔案回遠端倉儲時，出現以下錯誤訊息。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-UfsYoEMX3cQ/UNPUGDreTjI/AAAAAAAAHfs/fsaBOzIZmT8/image210.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-UfsYoEMX3cQ/UNPUGDreTjI/AAAAAAAAHfs/fsaBOzIZmT8/image210.jpg" alt="image210.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>當 push 發生衝突時，可以透過 (1) fetch+merge 或 (2) pull 來解決。以下只說明使用 fetch + merge 處理方式( pull 操作較為簡單，可自行練習使用)。 </p>



<p>滑鼠右鍵「TortoiseGit」選單 -&gt; 「Fetch…」<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-JMSBQ2kkXUU/UNPUCReqFUI/AAAAAAAAHf8/5GAuWC_ktYo/image157.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-JMSBQ2kkXUU/UNPUCReqFUI/AAAAAAAAHf8/5GAuWC_ktYo/image157.jpg" alt="image157.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>從遠端倉儲抓了較新的資料，接著我們把他和我們的版本合併在一起。滑鼠右鍵「TortoiseGit」選單 -&gt; 「Merge…」。From的部份要選擇遠端的分支，例如：remotes/origin/master，填入Merge Message。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-ejA7RPFjviw/UNPUC_Gu3yI/AAAAAAAAHfg/bA-W55mzrRo/image159.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-ejA7RPFjviw/UNPUC_Gu3yI/AAAAAAAAHfg/bA-W55mzrRo/image159.jpg" alt="image159.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-czkyoVIJF3E/UNPUFAiJB7I/AAAAAAAAE-I/znJeAK3Biog/image196.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-czkyoVIJF3E/UNPUFAiJB7I/AAAAAAAAE-I/znJeAK3Biog/image196.png" alt="image196.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>系統自動執行合併時發現有衝突，導致無法自動合併。關閉視窗後，可以看到衝突的檔案變成黃色三角形驚嘆號。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-dBKGsarL7y0/UNPUAJmptrI/AAAAAAAAE8M/vYacMZh0kZE/image129.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-dBKGsarL7y0/UNPUAJmptrI/AAAAAAAAE8M/vYacMZh0kZE/image129.png" alt="image129.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-7TUcwDIi1xg/UNPUGkXkSwI/AAAAAAAAE-0/K-IuT8EtFzs/image229.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-7TUcwDIi1xg/UNPUGkXkSwI/AAAAAAAAE-0/K-IuT8EtFzs/image229.png" alt="image229.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>在 newFile.txt 上點選滑鼠右鍵開啟「TortoiseGit」選單 -&gt; 「Diff」，即可開始編輯有衝突的部份(<a href="file:///G:/%E6%88%91%E7%9A%84%E6%96%87%E4%BB%B6/git.doc#符號說明" data-wpel-link="internal">符號說明</a>)，修改完成後儲存檔案。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-j1pqWZPUtgI/UNPUKVG5SyI/AAAAAAAAHfw/yCQFEZWj_eg/image235.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-j1pqWZPUtgI/UNPUKVG5SyI/AAAAAAAAHfw/yCQFEZWj_eg/image235.jpg" alt="image235.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>接著把剛剛做的變更 commit 到本地倉儲中。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-W-v5jdJlgis/UNPUBIK765I/AAAAAAAAE8g/pDR7A0TIyKU/image140.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-W-v5jdJlgis/UNPUBIK765I/AAAAAAAAE8g/pDR7A0TIyKU/image140.png" alt="image140.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-dyUSerXv6RQ/UNPUHSL4IkI/AAAAAAAAE_A/sXxoAaFJAAI/image245.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-dyUSerXv6RQ/UNPUHSL4IkI/AAAAAAAAE_A/sXxoAaFJAAI/image245.png" alt="image245.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>將本地倉儲的變更 push 到遠端倉儲，以上為衝突發生時的處理流程。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-VbV_b4STdk0/UNPUH2cJkQI/AAAAAAAAE_U/YRRtnljJgq4/image250.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-VbV_b4STdk0/UNPUH2cJkQI/AAAAAAAAE_U/YRRtnljJgq4/image250.png" alt="image250.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-l-cAYhVqvP0/UNPUIdjbPoI/AAAAAAAAHf0/vxD0dVSKR-E/image252.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-l-cAYhVqvP0/UNPUIdjbPoI/AAAAAAAAHf0/vxD0dVSKR-E/image252.jpg" alt="image252.png" title="Git GUI - (4) fetch、merge、pull、解決衝突情況(conflict)"></a></figure></div>



<p>本文完。有很多情況下沒辦法使用 GUI 介面，可到<strong><a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料1<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong>, <strong><a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong>, <strong><a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/02/29/git-scenario/" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料3<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong>，這三篇文章涵蓋了幾乎所有新手會遇到的問題！ </p>



<h2 class="para wp-block-heading">參考資料</h2>



<ol class="my-li bg-darkblue wp-block-list"><li>Git 教學(1) : Git 的基本使用 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(2)：Git Branch 的操作與基本工作流程 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 情境劇 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/02/29/git-scenario/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/02/29/git-scenario/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ol>



<p><strong>Git 系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI – (1) TortoiseGit, msysgit 安裝</a></li><li><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI – (2) 設定、Clone、Add、Modify</a></li><li><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI – (3) branch、conflict、merge</a></li><li><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI – (4) fetch、merge、pull、解決衝突情況(conflict)</a></li><li><a href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI &#8211; (4) fetch、merge、pull、解決衝突情況(conflict)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Git GUI &#8211; (3) branch、conflict、merge</title>
		<link>https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/</link>
					<comments>https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 10:22:03 +0000</pubDate>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[TortoiseGit]]></category>
		<category><![CDATA[Git]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2734</guid>

					<description><![CDATA[<p>接續上篇文章 Git GUI &#8211; (2) 設定、Clone、Add、Modify。 【四、建立分支(branch)】 如果有新功能要開發或是既有功能修改，但又不想影響到主要程式(maste&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI &#8211; (3) branch、conflict、merge</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>接續上篇文章 <strong><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">Git GUI &#8211; (2) 設定、Clone、Add、Modify</a></strong>。 </p>



<span id="more-2734"></span>



<h2 class="para wp-block-heading"><strong>【四、建立分支(branch)】</strong> </h2>



<p>如果有新功能要開發或是既有功能修改，但又不想影響到主要程式(master)的運作，這時候可以透過建立分支(branch)，所有的修改動作都在「分支」中進行，各個分支是獨立作業的。比如要開發某個大功能，大功能中又切分很多細小的功能，我們可以在主線分支(master)下建立一個大功能分支，接著在大功能分支下，又切出許多細小功能的分支，也可以在分支的下面建立更細的分支，形成多重架構。當分支開發、測試結束後，再透過合併(merge)的動作，將所有分支合併回主線分支(master)，或透過重造(rebase)的動作，將目前開發的分支(branch)提升為主線分支(master)。 </p>



<p>在E:\GitDaal\下點選滑鼠右鍵，接著選取「Create Branch…」。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-PkMLdcGwCmY/UNPT9mwqNUI/AAAAAAAAE7E/2U2sShBTkII/image100.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-PkMLdcGwCmY/UNPT9mwqNUI/AAAAAAAAE7E/2U2sShBTkII/image100.png" alt="image100.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-Ub1SVDkouB8/UNPT9-6IiPI/AAAAAAAAE7Q/I2wh9FrmSXU/image101.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-Ub1SVDkouB8/UNPT9-6IiPI/AAAAAAAAE7Q/I2wh9FrmSXU/image101.png" alt="image101.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>輸入分支名稱，例如：newBranch。如果是要建立其它分支下的分支，Base On 的部份選擇 Branch 的選項，再選擇要基於哪個分支下建立新分支，這邊由於我們是基於主線分支(master)建立分支，因此選擇「HEAD (master)」。將「Switch to new branch」打勾，當分支建立完成後，會將目前的環境切換到新建立的分支下。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//lh4.ggpht.com/-ueZfaX3czek/UNPT-agP51I/AAAAAAAAE7U/82eVue0qmTI/image107.png" alt="image107.png" title="Git GUI - (3) branch、conflict、merge"></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-MGMJi9GsJYU/UNPT-vQXBmI/AAAAAAAAE7g/YuD-xY4BLfU/image109.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-MGMJi9GsJYU/UNPT-vQXBmI/AAAAAAAAE7g/YuD-xY4BLfU/image109.png" alt="image109.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p> 在新分支中編輯的東西，並不會影響到主線分支(master)，當編輯到一段落，將新分支中的東西 commit 到本地倉儲(commit 請參考<strong><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">三、修改(新增)檔案</a></strong>)。點選滑鼠右鍵，選擇「Git Branch」-&gt;「master」可快速切換至 master。master 看見的 README.txt 與 newBranch 看見的 README.txt 是不一樣的。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//lh5.ggpht.com/-StRGocwKYRc/UNPT-0fGw_I/AAAAAAAAE7k/ub9zrDIOSKM/image111.png" alt="image111.png" title="Git GUI - (3) branch、conflict、merge"></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-T2UGhA4OaQ8/UNPT-8rmqkI/AAAAAAAAE7o/7GVVDqs3Bv0/image113.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-T2UGhA4OaQ8/UNPT-8rmqkI/AAAAAAAAE7o/7GVVDqs3Bv0/image113.png" alt="image113.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>如果不知道自己現在身處於哪個分支，只要點選滑鼠右鍵，就可以在上方紅色框框看到目前所在分支。「Git Branch」子選單下有打勾的就是目前分支。以及「Git Commit -&gt; “newBranch”」也可以看到現在是在 newBranch 分支下。</p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-ErfglxTp4Y0/UNPT_VetheI/AAAAAAAAE7w/F-8-S4FeXVk/image117.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-ErfglxTp4Y0/UNPT_VetheI/AAAAAAAAE7w/F-8-S4FeXVk/image117.png" alt="image117.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<h2 class="para wp-block-heading"><strong>【五、合併分支 (merge) 並解決衝突 (conflict)】</strong> </h2>



<p>當新的分支開發到一個段落時，Git 可以提供我們合併(merge)的功能，意即將目前分支(newBranch)開發的結果合併到主線分支(master)。 </p>



<p>滑鼠右鍵選單-&gt;「TortoiseGit」-&gt;「Merge」<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-tVs4h1J_128/UNPT_nEjFGI/AAAAAAAAE70/br2y15I800U/image119.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-tVs4h1J_128/UNPT_nEjFGI/AAAAAAAAE70/br2y15I800U/image119.png" alt="image119.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>Branch 部份選擇要被合併的分支，我們要把 newBranch 合併回 master，因此選擇 newBranch。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-FMT4iAUBMDw/UNPT_m1NqmI/AAAAAAAAE78/A0HZbxCg_LY/image124.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-FMT4iAUBMDw/UNPT_m1NqmI/AAAAAAAAE78/A0HZbxCg_LY/image124.png" alt="image124.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-dQcjqHiAsiU/UNPUAB1LsuI/AAAAAAAAE8E/OHmicgOB2Kg/image126.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-dQcjqHiAsiU/UNPUAB1LsuI/AAAAAAAAE8E/OHmicgOB2Kg/image126.png" alt="image126.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>若出現 Success 的字樣表示合併完成，沒有出現衝突的情況。此時視情況是否保留該 branch (可以理解成分支開發的子功能已經「加入」主線分支，該支線是否繼續保留開發功能或功成身退)。 </p>



<p>如果合併時產生衝突(Conflict)的錯誤訊息，表示必須使用手動的方式來處理衝突。衝突的檔案會出現黃色三角形驚嘆號的圖樣。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-dBKGsarL7y0/UNPUAJmptrI/AAAAAAAAE8M/vYacMZh0kZE/image129.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-dBKGsarL7y0/UNPUAJmptrI/AAAAAAAAE8M/vYacMZh0kZE/image129.png" alt="image129.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-se527DEmiZE/UNPUASsGQ3I/AAAAAAAAE8Q/4nDJ05GNf3s/image131.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-se527DEmiZE/UNPUASsGQ3I/AAAAAAAAE8Q/4nDJ05GNf3s/image131.png" alt="image131.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>

在衝突的檔案上，開啟滑鼠右鍵 TortoiseGit 選單中的「Diff」。左邊是倉儲中上一個版本的檔案內容，只有五行內容，右邊則分為兩部分，從「&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD」到「=======」，表示最新版本中的內容，有六行內容，而「=======」到「&gt;&gt;&gt;&gt;&gt;&gt;&gt; newBranch」是要合併的分支中的內容。此處視情況修改檔案內容，並把「&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD」「=======」「&gt;&gt;&gt;&gt;&gt;&gt;&gt; newBranch」符號拿掉後存檔即完成修改。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-74sH3ysHUZ4/UNPUArTn01I/AAAAAAAAE8U/JyOxnU7jrzY/image133.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-74sH3ysHUZ4/UNPUArTn01I/AAAAAAAAE8U/JyOxnU7jrzY/image133.png" alt="image133.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-S1R-GvsIXZ4/UNPUA7n3WEI/AAAAAAAAE8w/X18aSZ9lbUw/image135.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-S1R-GvsIXZ4/UNPUA7n3WEI/AAAAAAAAE8w/X18aSZ9lbUw/image135.png" alt="image135.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>修改完將檔案 commit 回本地倉儲。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-Hk9ersfBd6c/UNPUHGZ4XUI/AAAAAAAAE_I/YNvbNa-gtzM/image243.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-Hk9ersfBd6c/UNPUHGZ4XUI/AAAAAAAAE_I/YNvbNa-gtzM/image243.png" alt="image243.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>接著選取滑鼠右鍵選單中的「Git History」，如下圖，上方為目前Git的分支狀況，修改者以及修改時間…等，下方為修改內容以及註解…等等資訊。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-Oa_70h1qyq0/UNPUBDrAR5I/AAAAAAAAE8o/danZe-ABNfY/image143.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-Oa_70h1qyq0/UNPUBDrAR5I/AAAAAAAAE8o/danZe-ABNfY/image143.png" alt="image143.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-TksSwH0gHZY/UNPUBuFffxI/AAAAAAAAHfc/gXvWFNtTCX0/image145.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-TksSwH0gHZY/UNPUBuFffxI/AAAAAAAAHfc/gXvWFNtTCX0/image145.jpg" alt="image145.png" title="Git GUI - (3) branch、conflict、merge"></a></figure></div>



<p>下一篇文章：<strong><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">Git GUI &#8211; (4) fetch、merge、pull、解決衝突情況(conflict)</a></strong></p>



<h2 class="para wp-block-heading">參考資料</h2>



<ol class="my-li bg-darkblue wp-block-list"><li>Git 教學(1) : Git 的基本使用 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(2)：Git Branch 的操作與基本工作流程 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 情境劇 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/02/29/git-scenario/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/02/29/git-scenario/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ol>



<p><strong>Git 系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI – (1) TortoiseGit, msysgit 安裝</a></li><li><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI – (2) 設定、Clone、Add、Modify</a></li><li><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI – (3) branch、conflict、merge</a></li><li><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI – (4) fetch、merge、pull、解決衝突情況(conflict)</a></li><li><a href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI &#8211; (3) branch、conflict、merge</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Git GUI &#8211; (2) 設定、Clone、Add、Modify</title>
		<link>https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/</link>
					<comments>https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 10:21:24 +0000</pubDate>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[TortoiseGit]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2569</guid>

					<description><![CDATA[<p>依照上一篇文章 Git GUI &#8211; (1) TortoiseGit, msysgit 安裝 安裝好 Git 工具後，這篇大概記錄一下怎麼處理 Clone, Add, Modify &#82&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI &#8211; (2) 設定、Clone、Add、Modify</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>依照上一篇文章 <strong><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI &#8211; (1) TortoiseGit, msysgit 安裝</a></strong> 安裝好 Git 工具後，這篇大概記錄一下怎麼處理 Clone, Add, Modify &#8230; 等操作。 </p>



<span id="more-2569"></span>



<p>安裝完 TortoiseGit 及 msysgit 之後，即可開始使用 TortoiseGit 來管理專案，本範例主要描述如何使用 TortoiseGit 來管理既有專案，包括從遠端倉儲複製資料(clone)，操作本地倉儲(add, commit)，操作遠端倉儲(push)以及處理衝突(conflict)。 </p>



<h2 class="para wp-block-heading"><strong>【一、基本設定】</strong> </h2>



<p>在本機電腦上新增一個資料夾，例如：E:\GitDaal\，進入該資料夾，點選滑鼠右鍵，選取 TortoiseGit -&gt; Settings。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-yAYaXPG45ag/UNPT5nbYQfI/AAAAAAAAE5k/mGTrAhyqGLM/image049.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-yAYaXPG45ag/UNPT5nbYQfI/AAAAAAAAE5k/mGTrAhyqGLM/image049.png" alt="image049.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-EVrisxKFsKg/UNPT45guELI/AAAAAAAAE5Q/PeDpEw5R_b4/image048.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-EVrisxKFsKg/UNPT45guELI/AAAAAAAAE5Q/PeDpEw5R_b4/image048.png" alt="image048.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>輸入個人資料(Config)，名稱及電子郵件。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-JvgjkG-udZE/UNPT5sqMiPI/AAAAAAAAHfI/X2pzCQSEZyM/image053.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-JvgjkG-udZE/UNPT5sqMiPI/AAAAAAAAHfI/X2pzCQSEZyM/image053.jpg" alt="image053.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>設定遠端伺服器(Remote)，Remote name可以隨便輸入，輸入您的 git Url 後點選 Add New，設定完成後按確定關閉設定視窗。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-WwV_6BIyg4Y/UNPT508YzUI/AAAAAAAAHfM/ki5iWZfjafo/image059.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-WwV_6BIyg4Y/UNPT508YzUI/AAAAAAAAHfM/ki5iWZfjafo/image059.jpg" alt="image059.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<h2 class="para wp-block-heading"><strong>【二、從遠端倉儲複製檔案 (Git Clone)】</strong> </h2>



<p>進入剛剛新增的 E:\GitDaal\ 資料夾，點選滑鼠右鍵選取「Git Clone…」。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-b6qlIDeTpXU/UNPT6TrRhVI/AAAAAAAAE5s/4u7CRXJQXjM/image062.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-b6qlIDeTpXU/UNPT6TrRhVI/AAAAAAAAE5s/4u7CRXJQXjM/image062.png" alt="image062.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>填入您的 Git URL，按下 OK 開始複製遠端倉儲的目錄及檔案。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-hHNioiyLOPQ/UNPT6sJZTjI/AAAAAAAAHfQ/JUIGL-St8Sw/image066.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-hHNioiyLOPQ/UNPT6sJZTjI/AAAAAAAAHfQ/JUIGL-St8Sw/image066.jpg" alt="image066.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>看到 Success 表示目錄及檔案複製成功。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-_79P1QcATzQ/UNPT616g0-I/AAAAAAAAHfU/iOKeZv7FeRY/image068.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-_79P1QcATzQ/UNPT616g0-I/AAAAAAAAHfU/iOKeZv7FeRY/image068.jpg" alt="image068.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>可看到 E:\GitDaal\ 資料夾及以下所有資料夾都有綠色圓圈的勾勾，表示所有檔案都複製完成，綠色表示目前工作目錄的檔案與本地倉儲的檔案一致。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-GaRTwK7R-lc/UNPT7Ob3wsI/AAAAAAAAE6M/tW3i23z_fNE/image071.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-GaRTwK7R-lc/UNPT7Ob3wsI/AAAAAAAAE6M/tW3i23z_fNE/image071.png" alt="image071.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<h2 class="para wp-block-heading"><strong>【三、修改(新增)檔案】</strong> </h2>



<p>下圖為 Git 工作流程，本範例中的 E:\GitDaal\ 即為工作目錄(working directory)，經過編輯的檔案必須先透過存放進暫存區(staging area)後才可以成功儲存至本地倉儲(local repository)，也只有在本地倉儲中的檔案及資料，才可以透過推送(push)的方式分享到遠端倉儲(remote repository)。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-XgbWetExMgk/UNPT7aHo7PI/AAAAAAAAE6I/AFqTWKBncXI/image073.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-XgbWetExMgk/UNPT7aHo7PI/AAAAAAAAE6I/AFqTWKBncXI/image073.png" alt="image073.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>用文字編輯器開啟剛剛透過 Git Clone 複製下來的 README.txt，修改完後存檔關閉檔案。(E:\GitDaal\README.txt)例如增加文字 ” Git test by Hans”。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-IrfCH0tQugU/UNPT7-dkLfI/AAAAAAAAE6Q/2TFBLjJ9_yw/image076.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-IrfCH0tQugU/UNPT7-dkLfI/AAAAAAAAE6Q/2TFBLjJ9_yw/image076.png" alt="image076.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>可以看到從原本的勾勾變成紅色圈圈驚嘆號，表示目前「工作目錄中」的檔案已經和「本地倉儲中」的檔案不一致了。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-vdriGynsiSQ/UNPT8E_S2wI/AAAAAAAAE6U/9CkhOeslG2A/image079.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-vdriGynsiSQ/UNPT8E_S2wI/AAAAAAAAE6U/9CkhOeslG2A/image079.png" alt="image079.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>TortoiseGit 簡化了上圖中 git add 指令，因此透過 TortoiseGit 可以直接做 commit 到本地倉儲的動作。點選滑鼠右鍵，選擇 Git Commit -&gt; “master”<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-RoZueCYb0ng/UNPT9327KPI/AAAAAAAAE7M/BKydPQFyBwU/image082.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-RoZueCYb0ng/UNPT9327KPI/AAAAAAAAE7M/BKydPQFyBwU/image082.png" alt="image082.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>開啟 Commit 介面，Message 部份填入這次 Commit 的資訊，TortoiseGit 會將工作目錄中所有被修改過的檔案列在下方的列表中，這邊我們只更動了 README.txt 檔案，打勾表示同意將該檔案 commit 至本地倉儲。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-7BkBhqBiBjA/UNPT8UDhcxI/AAAAAAAAE6c/oaF3ksqiM4E/image086.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-7BkBhqBiBjA/UNPT8UDhcxI/AAAAAAAAE6c/oaF3ksqiM4E/image086.png" alt="image086.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>出現 &nbsp;Success 表示檔案已成功 commit 到本地倉儲。TortoiseGit 為了讓使用者更方便，提供了左下角的 Push 按鈕，使用者可直接將檔案 push 到遠端倉儲，如果不想在此時 push，按下滑鼠右鍵的 TortoiseGit 選單中也有 push 的指令可選擇。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-Fx7Jn60IifM/UNPT8uorfKI/AAAAAAAAE6g/owhY970DRbI/image088.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-Fx7Jn60IifM/UNPT8uorfKI/AAAAAAAAE6g/owhY970DRbI/image088.png" alt="image088.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>如果要增加新的遠端倉儲，可以點選「Manage」新增。點選 OK 之後如果出現 Success 字樣表示這次的 push 完成。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-G7Thp6c1JX8/UNPT9BJv9uI/AAAAAAAAE60/ojQfQ1EWpts/image094.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-G7Thp6c1JX8/UNPT9BJv9uI/AAAAAAAAE60/ojQfQ1EWpts/image094.png" alt="image094.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-YdwmKtt3aiM/UNPT9EfHT7I/AAAAAAAAHfY/42Scom7fcd8/image096.jpg" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-YdwmKtt3aiM/UNPT9EfHT7I/AAAAAAAAHfY/42Scom7fcd8/image096.jpg" alt="image096.png" title="Git GUI - (2) 設定、Clone、Add、Modify"></a></figure></div>



<p>如果沒有出現 Success 可能是發生了衝突(conflict)，請參考 <strong><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">Git GUI &#8211; (4) fetch、merge、pull、解決衝突情況(conflict)</a></strong>。 </p>



<p>下一篇文章：<strong><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" target="_blank" rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" data-wpel-link="internal">Git GUI &#8211; (3) branch、conflict、merge</a></strong></p>



<p><strong>Git 系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI – (1) TortoiseGit, msysgit 安裝</a></li><li><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI – (2) 設定、Clone、Add、Modify</a></li><li><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI – (3) branch、conflict、merge</a></li><li><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI – (4) fetch、merge、pull、解決衝突情況(conflict)</a></li><li><a href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a></li></ul>



<h2 class="para wp-block-heading">參考資料</h2>



<ol class="my-li bg-darkblue wp-block-list"><li>Git 教學(1) : Git 的基本使用 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(2)：Git Branch 的操作與基本工作流程 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 情境劇 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/02/29/git-scenario/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/02/29/git-scenario/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI &#8211; (2) 設定、Clone、Add、Modify</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Git GUI &#8211; (1) TortoiseGit, msysgit 安裝</title>
		<link>https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/</link>
					<comments>https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 10:20:10 +0000</pubDate>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[msysgit]]></category>
		<category><![CDATA[TortoiseGit]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2563</guid>

					<description><![CDATA[<p>Git 是一個分散式版本控管的好工具(維基百科的 Git 介紹)，這邊從簡單、有圖形化界面的開始吧！注意：小蛙也還是 Git 新手，很多指令都要去查，這系列文章在實際做法上可能會有所出入！如果發現有問&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI &#8211; (1) TortoiseGit, msysgit 安裝</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>Git 是一個分散式版本控管的好工具(<a rel="noreferrer noopener nofollow external" href="http://zh.wikipedia.org/wiki/Git" target="_blank" data-wpel-link="external" class="wpel-icon-right">維基百科的 Git 介紹<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)，這邊從簡單、有圖形化界面的開始吧！注意：小蛙也還是 Git 新手，很多指令都要去查，這系列文章在實際做法上可能會有所出入！如果發現有問題，可以在文章下面留言，感恩喔！ </p>



<span id="more-2563"></span>



<h2 class="para wp-block-heading"> <strong>【安裝TortoiseGit】</strong> </h2>



<p>TortoiseGit 這個工具是由著名的 Tortoise 所開發，讓使用者在 Windwos 環境下可透過圖形化的操作方式，簡化了以往操作 Git 需透過命令列下指令的麻煩。 </p>



<p>下載 TortoiseGit-1.5.8.0-32bit.msi，<a rel="noreferrer noopener nofollow external" href="http://download.tortoisegit.org/tgit/" target="_blank" data-wpel-link="external" class="wpel-icon-right">下載位址<span class="wpel-icon wpel-image wpel-icon-6"></span></a>。(<a rel="noreferrer noopener nofollow external" href="http://download.tortoisegit.org/tgit/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://download.tortoisegit.org/tgit/<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-v_N6a3gmyZk/UNPT0TgG2jI/AAAAAAAAE3k/SrfFjXl_oxU/image001.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-v_N6a3gmyZk/UNPT0TgG2jI/AAAAAAAAE3k/SrfFjXl_oxU/image001.png" alt="image001.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>開始安裝，預設安裝即可，安裝完重新啟動電腦。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//lh3.ggpht.com/-1p3xIxihTk8/UNPT0ew2ihI/AAAAAAAAE3s/IS5KxSw82Xc/image007.png" alt="image007.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//lh4.ggpht.com/-eleMlM3C8Tc/UNPT0eqbeiI/AAAAAAAAE3o/1QpON5-QW6U/image009.png" alt="image009.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-P13tyVE2QBM/UNPT02GqYXI/AAAAAAAAE30/Z7mB3BJI4as/image011.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-P13tyVE2QBM/UNPT02GqYXI/AAAAAAAAE30/Z7mB3BJI4as/image011.png" alt="image011.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-duoFlPrJam4/UNPT1AU2MVI/AAAAAAAAE3w/WzP5XGvrpLM/image014.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-duoFlPrJam4/UNPT1AU2MVI/AAAAAAAAE3w/WzP5XGvrpLM/image014.png" alt="image014.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-EHJ3HAcEC50/UNPT1beYa4I/AAAAAAAAE34/eE7Fj5Z9EDU/image016.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-EHJ3HAcEC50/UNPT1beYa4I/AAAAAAAAE34/eE7Fj5Z9EDU/image016.png" alt="image016.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-dFG7lIiuJg4/UNPT15U9UlI/AAAAAAAAE4E/3BLgKKBHm3o/image018.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-dFG7lIiuJg4/UNPT15U9UlI/AAAAAAAAE4E/3BLgKKBHm3o/image018.png" alt="image018.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>安裝完 TortoiseGit 重新開機。 </p>



<h2 class="para wp-block-heading"> <strong>【安裝msysgit】</strong> </h2>



<p>

下載 Git-1.7.3.1-preview20101002.exe，<a href="http://msysgit.github.io/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">下載位址<span class="wpel-icon wpel-image wpel-icon-6"></span></a>。(<a href="http://msysgit.github.io/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://msysgit.github.io/<span class="wpel-icon wpel-image wpel-icon-6"></span></a>) <br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh5.ggpht.com/-7gjtiopZoBE/UNPT2MxB68I/AAAAAAAAE4M/ccIVogIka_U/image020.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh5.ggpht.com/-7gjtiopZoBE/UNPT2MxB68I/AAAAAAAAE4M/ccIVogIka_U/image020.png" alt="image020.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>開始安裝 Git。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-Hko9tRE6LqA/UNPT2EGsesI/AAAAAAAAE4Q/QdI490aC0SI/image023.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-Hko9tRE6LqA/UNPT2EGsesI/AAAAAAAAE4Q/QdI490aC0SI/image023.png" alt="image023.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-sn_e6-MyTuA/UNPT2ikkYjI/AAAAAAAAE4c/97gOtwL4z7E/image025.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-sn_e6-MyTuA/UNPT2ikkYjI/AAAAAAAAE4c/97gOtwL4z7E/image025.png" alt="image025.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-FqjQmB9ufmw/UNPT3GwYeJI/AAAAAAAAE4o/W_6opOvjLlc/image027.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-FqjQmB9ufmw/UNPT3GwYeJI/AAAAAAAAE4o/W_6opOvjLlc/image027.png" alt="image027.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//lh3.ggpht.com/-5Rp5HfLFUfQ/UNPT3tuVgbI/AAAAAAAAE4s/ap_m4S6dZjc/image031.png" alt="image031.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-U5emFqnrnsg/UNPT31GkrAI/AAAAAAAAE44/GsuPlSzLuzM/image033.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-U5emFqnrnsg/UNPT31GkrAI/AAAAAAAAE44/GsuPlSzLuzM/image033.png" alt="image033.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>SSH 工具的選擇，請選擇「Use (Tortoise)Plink」的選項，並且將路徑指定到剛剛安裝的 TortoiseGit\ 目錄下的TortoisePlink.exe。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh3.ggpht.com/-ncKwtp0fJPY/UNPT4KEfYqI/AAAAAAAAE48/U26PA8rOHX4/image037.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh3.ggpht.com/-ncKwtp0fJPY/UNPT4KEfYqI/AAAAAAAAE48/U26PA8rOHX4/image037.png" alt="image037.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>安裝完成後重新啟動電腦。<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh4.ggpht.com/-YwoxHxP0jTk/UNPT4adfFzI/AAAAAAAAE5A/h5_i8psqMlw/image040.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh4.ggpht.com/-YwoxHxP0jTk/UNPT4adfFzI/AAAAAAAAE5A/h5_i8psqMlw/image040.png" alt="image040.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-7Pw78dcbrn8/UNPT41cTkGI/AAAAAAAAE5M/Ojv-WkCcQYg/image042.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-7Pw78dcbrn8/UNPT41cTkGI/AAAAAAAAE5M/Ojv-WkCcQYg/image042.png" alt="image042.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://lh6.ggpht.com/-_CK8tgnYyog/UNPT45BLqrI/AAAAAAAAE5I/Wa56x5X_OVU/image045.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="//lh6.ggpht.com/-_CK8tgnYyog/UNPT45BLqrI/AAAAAAAAE5I/Wa56x5X_OVU/image045.png" alt="image045.png" title="Git GUI - (1) TortoiseGit, msysgit 安裝"></a></figure></div>



<p>下一篇：<strong><a aria-label=" (在新分頁中開啟)" href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" target="_blank" rel="noreferrer noopener" data-wpel-link="internal">Git GUI &#8211; (2) 設定、Clone、Add、Modify</a></strong></p>



<p><strong>Git 系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI – (1) TortoiseGit, msysgit 安裝</a></li><li><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI – (2) 設定、Clone、Add、Modify</a></li><li><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI – (3) branch、conflict、merge</a></li><li><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI – (4) fetch、merge、pull、解決衝突情況(conflict)</a></li><li><a href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a></li></ul>



<h2 class="para wp-block-heading">參考資料</h2>



<ol class="my-li bg-darkblue wp-block-list"><li>Git @ 維基百科<a rel="noreferrer noopener nofollow external" href="http://zh.wikipedia.org/wiki/Git" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://zh.wikipedia.org/wiki/Git<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>tortoisegit @&nbsp;Google Project Hosting<a rel="noreferrer noopener nofollow external" href="https://code.google.com/p/tortoisegit/downloads/list" target="_blank" data-wpel-link="external" class="wpel-icon-right">https://code.google.com/p/tortoisegit/downloads/list<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>msysgit @ Google Project Hosting<a rel="noreferrer noopener nofollow external" href="https://code.google.com/p/msysgit/downloads/list?can=3" target="_blank" data-wpel-link="external" class="wpel-icon-right">https://code.google.com/p/msysgit/downloads/list?can=3<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(1) : Git 的基本使用 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(2)：Git Branch 的操作與基本工作流程 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 情境劇 @ 好麻煩部落格<a rel="noreferrer noopener nofollow external" href="http://blog.gogojimmy.net/2012/02/29/git-scenario/" target="_blank" data-wpel-link="external" class="wpel-icon-right">http://blog.gogojimmy.net/2012/02/29/git-scenario/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI &#8211; (1) TortoiseGit, msysgit 安裝</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[參考文章] 使用 Git 做為網站開發版本控管工具</title>
		<link>https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/</link>
					<comments>https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Wed, 02 Jan 2013 09:20:24 +0000</pubDate>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2626</guid>

					<description><![CDATA[<p>小蛙最近在找一個 website 開發上的解決方案，發現下面這篇文章可以符合小蛙的要求，本文主用小蛙自己的理解&#8221;記錄&#8221;下來。【A web-focused Git workflo&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>小蛙最近在找一個 website 開發上的解決方案，發現下面這篇文章可以符合小蛙的要求，本文主用小蛙自己的理解&#8221;記錄&#8221;下來。<strong><a rel="noreferrer noopener nofollow external" href="http://joemaller.com/990/a-web-focused-git-workflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">【A web-focused Git workflow @ joe maller.com&nbsp;】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong></p>



<span id="more-2626"></span>



<p>使用 <a rel="noreferrer noopener nofollow external" href="http://zh.wikipedia.org/wiki/Git" target="_blank" data-wpel-link="external" class="wpel-icon-right">Git<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 做為版本控管非常好用，網路上有很多 Git 教學文：<br><strong><a rel="noreferrer noopener nofollow external" href="http://ihower.tw/blog/archives/5391/" target="_blank" data-wpel-link="external" class="wpel-icon-right">【Git and Github 演講投影片(2011) @ ihower { blogging }】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong><br><strong><a rel="noreferrer noopener nofollow external" href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" data-wpel-link="external" class="wpel-icon-right">【Git 教學(1) : Git 的基本使用 @ 好麻煩部落格】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong><br><strong><a rel="noreferrer noopener nofollow external" href="http://blog.longwin.com.tw/2009/05/git-learn-initial-command-2009/" target="_blank" data-wpel-link="external" class="wpel-icon-right">【Git 初學筆記 &#8211; 指令操作教學 @ Tsung&#8217;s Blog】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong><br></p>



<p>這篇文章參考自<strong><a rel="noreferrer noopener nofollow external" href="http://joemaller.com/990/a-web-focused-git-workflow/" target="_blank" data-wpel-link="external" class="wpel-icon-right">【A web-focused Git workflow @ joe maller.com&nbsp;】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong>，以下文章指令輸入的部份源自於原始網頁，說明的部分是小蛙破英文翻過來的(只挑部份，沒有逐字翻)，連結到原始作者網頁可看到更多資訊。 </p>



<p>這邊原作者把架構拉開分成 3 種身份(點回作者網站可以看到架構圖)：<strong>Clones(副本)</strong>、<strong>Hub(匯整)</strong>、<strong>Prime(網站)</strong>。 </p>



<p>大致上的流程為：<strong>所有開發者從 Hub clone 一份下來開發，最後 push 回 Hub，再由 Hub 中的 hook 進入 Prime 的目錄下執行 pull，當 Prime 有 commit 動作時，也透過 hook 將變動 push 到 Hub 以維持兩個 repository 的一致性。</strong></p>



<p><strong>Hub</strong>: bare repository，其他開發者只能從這邊 clone 資料。</p>



<p><strong>Prime</strong>: standard repository，網站的目錄。 </p>



<p>安裝並設定 Git </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">git config --global user.name "Joe, working on the server"</pre>



<p>在網站目錄下初始化一個新的 Git repository (Prime) </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">cd ~/www
git init
git add .
git commit -m"initial import of pre-existing web files"</pre>



<p>在網站目錄之外的地方建立一個 bare repository (Hub) </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">cd; mkdir site_hub.git; cd site_hub.git
git --bare init
Initialized empty Git repository in /home/joe/site_hub.git</pre>



<p>從 Prime 目錄下，把 Hub 加入到 remote 中，並且把 Prime 上的 master push 到 Hub 上 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">cd ~/www
git remote add hub ~/site_hub.git
git remote show hub
* remote hub
  URL: /home/joe/site_hub.git
git push hub master</pre>



<p>為了讓 hub 跟 prime 緊密連接在一起，且不影響到工作目錄結構，這邊作者在 Hub repository 上設定 post-update (<a rel="noreferrer noopener nofollow external" href="http://gitbook.liuhui998.com/5_8.html" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)，當 Hub 接收到更新(git push)時，便會切換到網站目錄(prime)下的 repository 執行 git pull 的動作 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">#!/bin/sh
echo
echo "**** Pulling changes into Prime [Hub's post-update hook]"
echo
cd $HOME/www || exit
unset GIT_DIR
git pull hub master
exec git-update-server-info</pre>



<p>在 Prime repository 中加入 post-commit (<a rel="noreferrer noopener nofollow external" href="http://gitbook.liuhui998.com/5_8.html" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)，為了維持 hub 跟 prime 雙向一致，如果真的 Prime 被手動修改了，也可以立即將這個變動發送到 Hub 上，讓 Hub 知道這些變動，避免 conflict </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">#!/bin/sh
echo
echo "**** pushing changes to Hub [Prime's post-commit hook]"
echo
git push hub</pre>



<p>有一些情況下 Prime 跟 Hub 會發生不一致的情況，作者提到如果衝突發生時，最好的做法是先把目前發生問題的 Prime 的狀態 push 到 Hub 的 &#8220;fixme&#8221; 分支，如此一來其他的 clones 就可以把有問題的分支 pull 下來，處理完成後再 merge，以免因為 Git 的衝突標示使得網站無法正常運作 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">git push hub master:refs/heads/fixme</pre>



<p>由於 Prime 的 .git 資料夾在網站的根目錄可能會有安全性的問題，使用 Apache 的話可以透過以下方式禁止 .git 被存取 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code"># deny access to the top-level git repository:
RewriteEngine On
RewriteRule \.git - [F,L]</pre>



<p>如果看到以下錯誤，就把 export PATH=${PATH}:~/bin 加入到 Server 上的 .bashrc 中。 </p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">git-receive-pack: command not found
fatal: The remote end hung up unexpectedly</pre>



<h2 class="para wp-block-heading">參考資料</h2>



<ol class="my-li bg-darkblue wp-block-list"><li>A web-focused Git workflow @ joe maller.com<br><a href="http://joemaller.com/990/a-web-focused-git-workflow/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://joemaller.com/990/a-web-focused-git-workflow/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git Hooks @ Git Book 中文版<br><a href="http://gitbook.liuhui998.com/5_8.html" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://gitbook.liuhui998.com/5_8.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git @ 維基百科，自由的百科全書<br><a href="http://zh.wikipedia.org/wiki/Git" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://zh.wikipedia.org/wiki/Git<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git and Github 演講投影片(2011) @ ihower { blogging }<br><a href="http://ihower.tw/blog/archives/5391/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://ihower.tw/blog/archives/5391/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 教學(1) : Git 的基本使用 @ 好麻煩部落格<br><a href="http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li><li>Git 初學筆記 &#8211; 指令操作教學 @ Tsung&#8217;s Blog<br><a href="http://blog.longwin.com.tw/2009/05/git-learn-initial-command-2009/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">http://blog.longwin.com.tw/2009/05/git-learn-initial-command-2009/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ol>



<p><strong>Git 系列文章：</strong></p>



<ul class="my-li bg-darkblue wp-block-list"><li><a href="https://noter.tw/2563/git-gui-1-tortoisegit-msysgit-%e5%ae%89%e8%a3%9d/" data-wpel-link="internal">Git GUI – (1) TortoiseGit, msysgit 安裝</a></li><li><a href="https://noter.tw/2569/git-gui-2-%e8%a8%ad%e5%ae%9a%e3%80%81clone%e3%80%81add%e3%80%81modify/" data-wpel-link="internal">Git GUI – (2) 設定、Clone、Add、Modify</a></li><li><a href="https://noter.tw/2734/git-gui-3-branch%e3%80%81conflict%e3%80%81merge/" data-wpel-link="internal">Git GUI – (3) branch、conflict、merge</a></li><li><a href="https://noter.tw/2737/git-gui-4-fetch%e3%80%81merge%e3%80%81pull%e3%80%81%e8%a7%a3%e6%b1%ba%e8%a1%9d%e7%aa%81%e6%83%85%e6%b3%81conflict/" data-wpel-link="internal">Git GUI – (4) fetch、merge、pull、解決衝突情況(conflict)</a></li><li><a href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/" data-wpel-link="internal">[參考文章] 使用 Git 做為網站開發版本控管工具</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2626/%e5%8f%83%e8%80%83%e6%96%87%e7%ab%a0-%e4%bd%bf%e7%94%a8-git-%e5%81%9a%e7%82%ba%e7%b6%b2%e7%ab%99%e9%96%8b%e7%99%bc%e7%89%88%e6%9c%ac%e6%8e%a7%e7%ae%a1%e5%b7%a5%e5%85%b7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
