git branch XX #创建XX的分支
虽然创建了新的分支,但是当前分支还是在master
分支上,我们需要通过git checkout
命令切换到新建的issue102
分支上,来进行后续的开发操作。
Switched to branch 'XX'
# 在分支上创建下新的文件
touch XX.md
git add XX.md
git commit -m "update XX.md"touch XX.html
git add XX.html
git commit -m "update XX.html"
现在在这个分支下创建了文件,也就是说在XX分支下有这些文件,但是master分支下是没有的,因为还没有合并到master分支上。
# 切换回主分支
git checkout master
# 使用git merge 进行合并
git merge XX