<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Version-Control on Duke Hsu ｜ Learn • Build • Share</title><link>https://www.dukehsu.com/tags/version-control.html</link><description>Recent content in Version-Control on Duke Hsu ｜ Learn • Build • Share</description><image><title>Duke Hsu ｜ Learn • Build • Share</title><url>https://www.dukehsu.com/images/og-default.jpg</url><link>https://www.dukehsu.com/images/og-default.jpg</link></image><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 28 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.dukehsu.com/tags/version-control/index.xml" rel="self" type="application/rss+xml"/><item><title>Git and Github 筆記</title><link>https://www.dukehsu.com/posts/git_and_github_note.html</link><pubDate>Sun, 28 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.dukehsu.com/posts/git_and_github_note.html</guid><description>&lt;h2 id="git-and-github-筆記"&gt;Git and Github 筆記&lt;/h2&gt;
&lt;h3 id="git-fast-version-control"&gt;Git fast version control&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;一些基本概念&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;版本管理和跟蹤&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;版本控制系統是軟件工具&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;可以幫助團隊管理源代碼&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="status-of-version-版本狀態"&gt;Status of Version 版本狀態&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Untracked 未追蹤&lt;/li&gt;
&lt;li&gt;Tracked 已追蹤&lt;/li&gt;
&lt;li&gt;Staged 已暫存&lt;/li&gt;
&lt;li&gt;Committed 已提交&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="head---master--branch"&gt;HEAD -&amp;gt; master / branch&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;HEAD ： 目前進度，最新狀態&lt;/li&gt;
&lt;li&gt;Master : 主線&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="git-追蹤的是檔案的變化不是檔案本身"&gt;git 追蹤的是檔案的變化，不是檔案本身&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;刪除檔案也需要&amp;quot;add&amp;quot; 和 &amp;ldquo;commit&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="需要忽略的版本管理的文件"&gt;需要忽略的版本管理的文件&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;在projec 目錄下 新增 &lt;code&gt;.gitignore&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;在&lt;code&gt;.gitignore&lt;/code&gt; 文件中寫入不需要進行版本管理控制的文件後綴或者文件名&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="github-是平台--相當於server"&gt;Github 是平台 / 相當於Server&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Git 工具將文檔或者代碼 託管到github 平台 -&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="install-安裝"&gt;Install 安裝&lt;/h3&gt;
&lt;h4 id="mac-os"&gt;Mac os&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Mac OS 自帶 git 輸入 &lt;code&gt;git -- version&lt;/code&gt; 就可以看到git 版本&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="windows"&gt;Windows&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;下載最新的 &lt;a href="https://git-for-windows.github.io/"&gt;https://git-for-windows.github.io/&lt;/a&gt; git for windows&lt;/li&gt;
&lt;li&gt;根據指示完成git 的安裝&lt;/li&gt;
&lt;li&gt;完成安裝之後就可以看到git bash 的圖標&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="ubuntu-debian"&gt;Ubuntu /Debian&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;根據下方命令進行安裝&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt-get update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt-get install git
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ git --version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="use-使用"&gt;Use 使用&lt;/h3&gt;
&lt;h4 id="基礎配置"&gt;基礎配置&lt;/h4&gt;
&lt;p&gt;使用以下命令配置git 用戶名和電子郵件&lt;/p&gt;</description></item></channel></rss>