Git创建子分支,合并分支并提交

作者:重科前端小鑫 时间:2022-01-16 19:27:29 

Git合并分支后,需要将子分支提交到git仓库,这个时候就需要单独提交子分支,其步骤如下:

1.先创建子分支,并包含最新当前分支下的修改数据


git checkout -b sonBranch

2.将新分支内容全部提交


git add .
git commit -m "完成开发"

3.在码云创建一个子分支


git push -u origin sonBranch

4.切换到主分支


git checkout master

5.合并分支,更新主分支内容


git merge sonBranch

6.重新提交主分支内容


git push

PS:下面看下gitee 如何创建仓库 及发布

http://pengchenggang.gitee.io/layuisyshelp

-----------

在本地项目文件中使用bash


$ git config --global user.name "你的名字"

$ git config --global user.email "你的邮箱"

1. 初始化 


$ git init
$ git remote add origin https://gitee.com/xxx/xxx.git (你的远程项目地址)

2.克隆一下


$ git clone https://****.git (你的远程项目地址)

3. 提交


$ git pull origin master

$ git add .

$ git commit -m "你的第一次提交"

$ git push origin master
---------------------

gitee 里面要发布一个pages的服务,然后就能访问了

来源:https://www.cnblogs.com/cqkjxxxx/p/12791313.html

标签:Git,子分支,合并分支
0
投稿

猜你喜欢

  • Python技法之如何用re模块实现简易tokenizer

    2021-08-04 17:03:52
  • Python @property装饰器原理解析

    2022-02-19 20:28:05
  • np.random.seed() 的使用详解

    2021-04-08 23:54:57
  • 什么是响应式Web设计?怎样进行?

    2011-11-21 17:00:40
  • Go中函数的使用细节与注意事项详解

    2023-10-15 01:02:32
  • Tensorflow中使用cpu和gpu有什么区别

    2021-10-15 15:48:45
  • Python特效之文字成像方法详解

    2021-08-09 09:34:06
  • pyshp创建shp点文件的方法

    2023-06-30 03:15:29
  • php函数serialize()与unserialize()用法实例

    2023-11-19 00:53:23
  • 解决pycharm导入本地py文件时,模块下方出现红色波浪线的问题

    2023-11-11 10:38:14
  • Python实现内存泄露排查的示例详解

    2021-03-03 21:55:29
  • 从源码解析Python的Flask框架中request对象的用法

    2021-02-20 02:15:57
  • Python3.6日志Logging模块简单用法示例

    2021-03-18 06:47:38
  • python简单的函数定义和用法实例

    2022-10-07 12:35:03
  • Python3实现将文件树中所有文件和子目录归档到tar压缩文件的方法

    2022-11-29 08:22:38
  • Python判断字符串是否为字母或者数字(浮点数)的多种方法

    2023-04-12 07:55:47
  • python 读取txt中每行数据,并且保存到excel中的实例

    2022-06-14 02:28:09
  • Python多线程threading join和守护线程setDeamon原理详解

    2022-05-25 18:09:39
  • Python生成随机密码

    2022-04-02 19:21:19
  • Python实现将内容转为base64编码与解码

    2021-11-25 14:44:24
  • asp之家 网络编程 m.aspxhome.com