26.合并到主分支

git checkout master
Switched to branch 'master'

git merge lgnew
Updating 1c78eab..2456c71
Fast-forward
lab/test2.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 lab/test2.txt

git hist
* 2456c71 2023-05-05 | Added teset2.txt (HEAD -> master, lgnew) [aku]
* 1c78eab 2023-05-05 | Added teset3.txt [aku]
* 31e5621 2023-05-05 | Added teset2.txt [aku]
* 5dc8b1e 2023-05-05 | Added .gitignore [aku]
* b77158a 2023-05-05 | Moved test.txt to lab [aku]
* 929f644 2023-05-05 | Added 123456 to the test.txt [aku]
* d7f681f 2023-05-05 | Added abc to the test.txt (tag: v1) [aku]
* 01b8702 2023-05-05 | Add first file (tag: v1-beta) [aku]

从日志的输出结果来看,对于本地代码迭代,我们最好在新分支上操作,这样可以降低影响主分支,并且保持主分支的提交干净整洁。

Last updated