Git分支操作
查看分支
git branch -l #查看本地分支
git branch -r #查看远程分支
git branch -a #查看全部分支(远程的和本地的)
创建分支
git checkout -b dev origin/dev #在本地新建一个与远程的dev版本相同(被合并的版本)的dev分支
切换分支
git checkout master
合并分支
git merge dev #把本地的dev合并到master
推送分支
git push origin master #把本地的master同步到远程
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/02/25/git-branch-operation/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报


Git分支操作
查看分支
git branch -l #查看本地分支
git branch -r #查看远程分支
git branch -a #查看全部分支(远程的和本地的)
创建分支
git checkout -b dev orig……

文章目录
关闭
共有 0 条评论