20251031 北資大社課
Claire
Version Control
Git/Github
References
What is Git?
CLI
Linux kernel 是規模相當大的開放原始碼軟體專案。 Linux kernel 在 1991 年到 2002 年間的維護工作,幾乎都是透過補丁和壓縮檔來完成的。 在 2002 年時,Linux kernel 開始採用名為 BitKeeper 的商業分散式版本控制系統。
在 2005 年時,開發 Linux kernel 的社群與開發 BitKeeper 的商業公司的合作關係結束,也就無法再免費使用該工具。 這就迫使了 Linux 社群(特別是 Linux 之父 Linus Torvalds)基於使用 BitKeeper 所學到的經驗,來開發自有的工具。 這個系統必須達成:
快速、簡潔的設計、完整支援非線性的開發(上千個同時進行的分支)、完全的分散式系統、能夠有效地處理像 Linux kernel 規模的專案(速度及資料大小)
user@MacBook ~ %提示詞 指令 參數1 參數2 ... 參數npwd.git 存在的資料夾裡 Git 才會啟用版本控制功能
.git 是 Git 專案的資料庫,負責儲存所有歷史紀錄與設定
.git
.git 也會被複製下來
# MacOS/Linux
$ pwd
/tmp
#Windows
D:\abc> cd
D:\abcls-a 顯示隱藏檔(檔名為.開頭)
ls -a 可檢查 Git 專案是否成功初始化(出現 .git)
cd a:進入 a,a 必須在原本使用者所在的目錄中
cd ..:回到上一層目錄
cd ~:回到根目錄
mkdircd 才會進到新建立的資料夾
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew install git
$ git --version:驗證安裝成功
git version 2.xx.x
.gitconfig$ git config --global user.name "名字"
$ git config --global user.email "電子郵件地址"
$ git config --list
$ git config --local user.name "名字"
$ git config --local user.email "電子郵件地址"
git init會在目錄中建立.git
$ mkdir repo-name
$ cd repo-name
$ git init # 初始化目錄,讓 Git 對這個目錄開始進行版控
https://slides.com/aaw/burn-chicken/#/6
https://hackmd.io/@Sylvia-H/rkdKW2iaL
https://learn.microsoft.com/zh-tw/devops/develop/git/what-is-version-control
https://androidpollyanna.medium.com/git-基本原理-什麼是版本控制系統-4134d7024d18
https://www.astralweb.com.tw/version-control-and-github-project-build/
https://www.ithome.com.tw/voice/77088
https://git-scm.com/book/zh-tw/v2
https://willh.gitbook.io/gitpro/7d615cb13a55ac231e35e8658a897e0e/fbc71b2bb6fb6e6f999917afe5281632
https://career-map.org/2025/02/18/【完整指南】非工程師也能快速上手的-github-使用教學
https://docs.github.com/en
https://ithelp.ithome.com.tw/m/articles/10259830#:~:text=GitHub Issue 有點像是,功能確定問題是否解決。
https://medium.com/@brad61517/git101-心得-筆記-github-操作-push-pull-clone-fork-a414d4af64be
https://gitbook.tw/chapters/command-line/command-line