Git 支線Branch創建與Merge合併
Sharon Mai20230523, Tue
情境:當有多人同時分工開發或開發新功能測試,但不想影響到主架構程式,需要使用分支開發卻並ok在合併到主架構程式中。
指令說明
指令 |
說明 |
git branch ai_test |
創建支線與命名 |
git branch |
查詢現有主線與支線 |
git checkout - |
來回切換支線 |
git checkout master |
切換到指定支線 |
git merge prj_test |
合併支線 |
創建
查詢
- 查詢現有主線與支線
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
切換
- 來回切換支線
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
切換指定
合併
合併支線Branch
- 切到要合併其他支線的主線或分支(此以主線合併支線為例)
- 合併支線
- 完成!