●分支(同一個專案可以維護兩個版本)
=>一定要提交了才能做分支,沒提交不能切換分支
1.烏龜git=>建立分支,取名稱,基於主版本(master)

2.切換
.png)

3.選要切換的分支,也可以用這邊來建立新分支

4.切換到分支後修改檔案b後提交

5.再切回master,開啟檔案b會看不到剛剛輸入的那一行

6.在master建立新檔案c後提交,再切換到分支bench

7.在分支bench看不到剛剛在master建立的檔案c

●合併merge
1.一定要先切換到master

2.選擇合併
.png)

3.選擇要合併的分支=>確定

4.看日誌可以看出我們做分支和合併的歷程

5.看版本圖已可以看出差異
=>合併前

=>合併後

6.合併後看的到原本在分支的內容

文章標籤
全站熱搜