初步掌握Git與Github應用(7) – Git 分支 (1)
希望藉由這份筆記,讓正在學習這類知識的你/妳,能夠得到些許幫助。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Hint: 以下筆記內容所使用的作業系統為"Windows 10"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
簡單介紹分支 (branch)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
如果要進行團隊開發,分支(branch) 會是一個必須要了解的觀念。
- 在 Git Bash 操作 Git 的話,相信一定對路徑後方的 master 不陌生吧? 這個 master 代表的就是目前所在的分支,也可以說是現行的版本。有時為了修復 bug,會不小心搞壞現行版本,這時就可以透過建立新的 分支(branch),在新的分支上進行修復工作及 commit,確認修正無誤後,再合併(merge) 回 master 就好。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Hint: 圖片連結
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
瞭解目前所在分支(branch) - HEAD
HEAD 代表目前所在位置(分支)的指標,也可以說是目前所在的 commit 紀錄。
指令 |
功能說明 |
git branch |
確認目前所在分支 |
git checkout commit 前四碼 |
移動 HEAD 查看特定的 commit 紀錄 |
git checkout master |
回到 master 分支 上最近一次的 commit 紀錄 |
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Hint: 至少要有1次 commit 紀錄,才能透過 git branch
查詢到分支。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
建立分支(branch)
指令 |
功能說明 |
git branch 分支名稱 |
新增分支 |
git checkout 分支名稱 |
移動分支 |
Last updated 2021/07/19 by Qi Xiang