# Git 研習大綱 https://www.conventionalcommits.org/en/v1.0.0/ https://gitbook.tw/chapters/gitflow/why-need-git-flow [QA](https://app.sli.do/event/pDa1MDH6D97p4KxCUXkPBh) ## 大綱 - 專題會看 Git commit - 專題會看 Git commit - 專題會看 Git commit - Why Git - ![](https://i.imgur.com/Ixs4lG9.png) - 介紹 Git commands - config - commit - reset - add -p - .gitignore - log - checkout - commit --amend - revert - branch - merge - conflict - rebase - 介紹備份 - https://github.com/ - remote add - push - 練習備份 - 將自己的程式碼推到 GitHub - 推你寫好的歷史 - 別忘記 .gitignore,如果有金鑰之類的不要推到雲端 - 介紹協作 - clone - fork - 一人分飾兩角 - clone (user B) - Pull Request (user B -> user A) - Pull Request with conflict - 練習協作 - 兩兩一組各組指定小組長,練習發 PR - 所有人都要發 PR 到講師的 repo - 將學號放到 `roster.md` - 請不要刪除別人的學號 - (Optional) GitHub profile repo - 建立一個和自己 GitHub 帳號一樣的 repo - 建立 `README.md` - 放上自己的介紹以及圖片 - (Optional) GitHub blog with hugo - Clone [blog-tmpl](https://github.com/lambdaTW/blog-tmpl) - 修改成自己的自我介紹之類的 - 推上去自己的 GitHub - 選 Settings -> Pages -> Source -> GitHub Action -> Hugo -> Configure -> Start commit - 等幾分鐘 (可以去 Actions 頁面看) - Settings -> Pages -> 點選自己的網站 - https://gitbook.tw/ ## 參考資料 [講義](https://docs.google.com/presentation/d/1Ch6KEIFoIPIeiC44oZyyiifkwuosQGhe0GJCgWF2xyE/edit#slide=id.g19200cf072f_0_792) [Fork](https://hackmd.io/4oczJxD_SSOe_DuhpTytXw?view) [Markdown](https://hackmd.io/u-F5qLI6RAiatvuLCgCtKg?view) [共筆](https://hackmd.io/bIA6KvZMRFOXYBdI9dA9mA?both) [複製區](https://hackmd.io/YiXt01sZQ9arTtV1nUa3_w)