分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

git上传代码,合并代码,分支相关

发布时间:2023-09-06 01:21责任编辑:郭大石关键词:暂无标签

1.上传本地代码到git:
(1)git remote add origin git@gitlab.zhongjiaxin.com:DaWang/wechat-waiwei-hunter-new.git
(2)git add .
(3)git commit -m "注释"
(4)git push -u origin master

2.git分支合并到主干
(1)提交分支代码到分支,然后切换回主干

(2)pull下所有代码

(3)git merge xiahuyouhua02(分支名称)

(4)push所有代码

3.git主干合并到分支
(1)提交分支代码到本地仓库,然后切回主干

(2)pull下所有代码,然后切回分支

(3)git merge master(主干名称)

4.git分支相关
在本地新建一个分支: git branch Branch1
切换到你的新分支: git checkout Branch1
将新分支发布在github上: git push origin Branch1
在本地删除一个分支: git branch -d Branch1
在github远程端删除一个分支: git push origin :Branch1 ??(分支名前的冒号代表删除)

git上传代码,合并代码,分支相关

原文地址:http://www.cnblogs.com/smj1990/p/7765120.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved