<?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>tfvc 彙整 - 泰克哪裡去</title>
	<atom:link href="https://tech.uccu.website/tag/tfvc/feed" rel="self" type="application/rss+xml" />
	<link>https://tech.uccu.website/tag/tfvc</link>
	<description>一個科技相關的隨手記錄網站</description>
	<lastBuildDate>Sat, 17 Sep 2022 20:48:22 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
<site xmlns="com-wordpress:feed-additions:1">119574712</site>	<item>
		<title>【2021鐵人賽】版本控制系統Repos：建立第二個Repo，TFVC Repo</title>
		<link>https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=2021ironman-day5-version-control-tfvc-repo</link>
					<comments>https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html#respond</comments>
		
		<dc:creator><![CDATA[鳴人]]></dc:creator>
		<pubDate>Fri, 17 Sep 2021 15:14:12 +0000</pubDate>
				<category><![CDATA[2021鐵人賽]]></category>
		<category><![CDATA[Azure DevOps]]></category>
		<category><![CDATA[iThome鐵人賽]]></category>
		<category><![CDATA[2021ironman]]></category>
		<category><![CDATA[azure devops]]></category>
		<category><![CDATA[tfvc]]></category>
		<guid isPermaLink="false">https://tech.uccu.website/?p=530</guid>

					<description><![CDATA[<p>前一篇文章提到了Azure DevOps上的Repos可以分成Git Repo和TFVC Repo，因為最初建 ... <a title="【2021鐵人賽】版本控制系統Repos：建立第二個Repo，TFVC Repo" class="read-more" href="https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html" aria-label="Read more about 【2021鐵人賽】版本控制系統Repos：建立第二個Repo，TFVC Repo">閱讀全文</a></p>
<p>這篇文章 <a href="https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html">【2021鐵人賽】版本控制系統Repos：建立第二個Repo，TFVC Repo</a> 最早出現於 <a href="https://tech.uccu.website">泰克哪裡去</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://tech.uccu.website/2021ironman-day4-version-control-git-repo.html" target="_blank" rel="noreferrer noopener">前一篇文章</a>提到了Azure DevOps上的Repos可以分成Git Repo和TFVC Repo，因為最初建立Project的時候預設的版控是Git，所以系統自動以Project名稱建立了一個Git Repo，但是這並不代表一開始Project建立時的版控選擇Git就不能建立TFVC(Team Foundation Version Control)的版控Repo。</p>



<p>Git是近幾年流行的分散式版本控制系統，並且有一定的標準規範，而TFVC則是集中式的版本控制系統，早期使用過微軟的TFS(Team Foundation Server)的人應該對於TFVC的版控系統比較熟悉。Git和TFVC的選擇與簡易的比較，可以參考黑暗執行緒的這篇文章：「<a href="https://blog.darkthread.net/blog/tfvc-vs-git/">TFS Git 筆記 &#8211; 該用 TFVC 還是 Git？</a>」</p>



<p>首先，先來交待一下，如果在建立新的Project時就打算使用TFVC為版控選項的話，只要在建立Project的畫面點開Advanced選項之後，在Version control的下拉選單中就可以挑選Team Foundation Version Control作為版本控制系統，若是沒有點開Advanced，預設就是使用Git當作版控選項。</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="655" height="681" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/01299ea3-createnewproj-advselectversioncontrol.png?resize=655%2C681&#038;ssl=1" alt="" class="wp-image-536" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/01299ea3-createnewproj-advselectversioncontrol.png?w=655&amp;ssl=1 655w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/01299ea3-createnewproj-advselectversioncontrol.png?resize=289%2C300&amp;ssl=1 289w" sizes="(max-width: 655px) 100vw, 655px" /><figcaption>建立Project時要點開Advanced才會看得到版控選項</figcaption></figure></div>



<p>如果是已經存在的Project，在左邊Repos功能中的任何一個選項頁面，都可以看得到頭頂上的Repo選單，點開之後選擇New repository就可以叫出建立Repository的對話框：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="834" height="493" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/632900dc-repos-newrepository.png?resize=834%2C493&#038;ssl=1" alt="" class="wp-image-539" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/632900dc-repos-newrepository.png?w=834&amp;ssl=1 834w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/632900dc-repos-newrepository.png?resize=300%2C177&amp;ssl=1 300w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/632900dc-repos-newrepository.png?resize=768%2C454&amp;ssl=1 768w" sizes="(max-width: 834px) 100vw, 834px" /><figcaption>Repos底下的任何功能頁面的頭上都可以看到Repo選單</figcaption></figure></div>



<p>上面這個是比較快速方便的方式，但是也可以從Project Settings裡面建立新的Repo，進入Project Settings的Repositories功能頁之後，右上方就有Create的按鈕同樣可以叫出建立Repository的對話框：</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" width="1024" height="596" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/d01b90d2-projsettings-repositoriescreaterepo-1024x596.png?resize=1024%2C596&#038;ssl=1" alt="" class="wp-image-542" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/d01b90d2-projsettings-repositoriescreaterepo.png?resize=1024%2C596&amp;ssl=1 1024w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/d01b90d2-projsettings-repositoriescreaterepo.png?resize=300%2C175&amp;ssl=1 300w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/d01b90d2-projsettings-repositoriescreaterepo.png?resize=768%2C447&amp;ssl=1 768w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/d01b90d2-projsettings-repositoriescreaterepo.png?w=1219&amp;ssl=1 1219w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>從Project Settings中一樣可以建立Repository</figcaption></figure></div>



<p>在建立Repository的對話框中可以下拉選擇Repository type，選擇TFVC就可以建立集中式的版控系統，不過Repository的名稱無法修改，是使用Project名稱來建立：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="496" height="360" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/97795186-createrepo-tfvcrepo.png?resize=496%2C360&#038;ssl=1" alt="" class="wp-image-545" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/97795186-createrepo-tfvcrepo.png?w=496&amp;ssl=1 496w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/97795186-createrepo-tfvcrepo.png?resize=300%2C218&amp;ssl=1 300w" sizes="auto, (max-width: 496px) 100vw, 496px" /><figcaption>建立TFVC的Repo不能自訂名稱</figcaption></figure></div>



<p>如果是從Project Settings裡面去建立TFVC Repo，在第一個TFVC Repo建立之後，再度按下Create的按鈕叫出建立Repository的對話框還是可以再選擇TFVC的Repository type，然後再按下建立，但是因為Repository name是不給改的，所以我就好奇按下多次建立之後會發生什麼事情，結果…就不小心發現了一個Bug&#8230;，沒有先截圖，所以只好拿另一個Project再操作一次：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="931" height="313" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/f7c310f8-createtfvcrepobug.png?resize=931%2C313&#038;ssl=1" alt="" class="wp-image-548" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/f7c310f8-createtfvcrepobug.png?w=931&amp;ssl=1 931w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/f7c310f8-createtfvcrepobug.png?resize=300%2C101&amp;ssl=1 300w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/f7c310f8-createtfvcrepobug.png?resize=768%2C258&amp;ssl=1 768w" sizes="auto, (max-width: 931px) 100vw, 931px" /><figcaption>建立TFVC Repo的Bug</figcaption></figure></div>



<p>可以從上圖看到建立了多個相同名稱的TFVC Repo，但是若是在Project中的Repos底下任何功能頁的Repo下拉選單，還是只會看到一個TFVC的Repo：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="565" height="281" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/ab383ac5-repolistonlyonetfvcrepo.png?resize=565%2C281&#038;ssl=1" alt="" class="wp-image-551" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/ab383ac5-repolistonlyonetfvcrepo.png?w=565&amp;ssl=1 565w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/ab383ac5-repolistonlyonetfvcrepo.png?resize=300%2C149&amp;ssl=1 300w" sizes="auto, (max-width: 565px) 100vw, 565px" /><figcaption>Repo下拉選單只會有一個TFVC Repo</figcaption></figure></div>



<p>如果重新進入Project Settings的Repositories功能頁中查看，會發現上面多個TFVC Repo的列表變成了只有一個TFVC Repo：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="923" height="208" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/689a8dd5-projsettings-repositoriesonlyonetfvcrepo.png?resize=923%2C208&#038;ssl=1" alt="" class="wp-image-554" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/689a8dd5-projsettings-repositoriesonlyonetfvcrepo.png?w=923&amp;ssl=1 923w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/689a8dd5-projsettings-repositoriesonlyonetfvcrepo.png?resize=300%2C68&amp;ssl=1 300w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/689a8dd5-projsettings-repositoriesonlyonetfvcrepo.png?resize=768%2C173&amp;ssl=1 768w" sizes="auto, (max-width: 923px) 100vw, 923px" /><figcaption>重新進入Project Settings的Repositories中查看，只會看到一個TFVC Repo</figcaption></figure></div>



<p>無意間發現了這麼一個小Bug，但是其實只要在建立TFVC Repo之後有切換到其它的功能頁，再度叫出建立Repository的對話框之後，就會發現Repository type已經被鎖定成Git，無法再透過下拉選單選擇TFVC來建立：</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="500" height="362" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/8a422572-createrepo-aftercreatedtfvcrepo.png?resize=500%2C362&#038;ssl=1" alt="" class="wp-image-557" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/8a422572-createrepo-aftercreatedtfvcrepo.png?w=500&amp;ssl=1 500w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2021/09/8a422572-createrepo-aftercreatedtfvcrepo.png?resize=300%2C217&amp;ssl=1 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><figcaption>建立過TFVC Repo之後就只能建立Git Repo</figcaption></figure></div>



<p>不過現在主流與大多數人所使用的版本控制系統應該都已經是Git這種分散式的版本控制系統，會需要建立TFVC這種集中式的版控除了舊的習慣或組織中原本就是使用TFVC來進行版控之外，應該不太會再特意挑TFVC作為預設的版控，所以這篇文章也就只是簡單的說明一下該如何建立TFVC Repo，暫時就不做深入的介紹了。</p>
<p>這篇文章 <a href="https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html">【2021鐵人賽】版本控制系統Repos：建立第二個Repo，TFVC Repo</a> 最早出現於 <a href="https://tech.uccu.website">泰克哪裡去</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.uccu.website/2021ironman-day5-version-control-tfvc-repo.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">530</post-id>	</item>
	</channel>
</rss>
