分支合并

命令:

git merge 分支名

步骤:

创建分支

1.输入git branch回车
2.输入git checkout -b mergedemo回车
3.输入ll回车
4.输入cat test.txt回车
5.输入vim test.txt回车
6.按i键,输入内容“这是需要合并的内容”
7.按Esc键,输入wq退出vim模式
8.输入git add test.txt回车
9.输入git commit -m "增加合并内容"回车
10.输入git push --set-upstream origin mergedemo回车
11.输入cat test.txt回车
12.输入git checkout master回车
13.输入cat test.txt回车
在这里插入图片描述
在这里插入图片描述

分支合并

1.输入 git merge mergedemo回车
注:命令为合并分支
2.输入cat test.txt回车
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42884654/article/details/82824069