课堂重点:分支相关命令
实际应用-工作流程
实操命令及运行结果:
创建master分支并提交
git init
git add .
git commit -m "V1.0"
git remote add origin https://gitee.com/ZhangShunHai/gitbranch.git
git pull origin master --allow-unrelated-histories
git push -u origin master
创建feature分支并提交
git checkout -b feature
git add .
git commit -m "个人分支开发"
git pull origin feature
git push origin feature
此时feature分支没有与master分支合并,所以
合并feature和master分支
git checkout master
git merge feature
git add .
git commit -m "master 分支合并feature分支"
git pull origin master
git push origin master
删除feature分支
git checkout master
git branch -D feature
文件下载: