git合并分支
假如某个项目你有master和dev两个分支,现在需要将dev分支合并到master分支上
1.切换至master分支
git checkout mater
注意:永远不要忘记时刻更新代码
2.将dev分支代码合并到master分支上
git merge dev
3.查看状态及提交
git status
On branch master
Your branch is ahead of 'origin/master' by 12 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
提示有12个commit,需要push到远程master分支上
git push origin master
删除分支
查看所有分支 git branch -a
删除远程分支dev git push origin --delete dev
删除本地分支 git branch -d dev
来源:CSDN
作者:WhaleHumpback
链接:https://blog.csdn.net/qq_40851816/article/details/104899938