• git合并分支相关操作


      在开发过程中偶尔会遇到bug需要紧急修复,这时我们一般会新建一个单独分支专门用来修复bug,目的是不影响已有开发进度,这就涉及到新建分支、合并分支、打tag等操作,今天在这里给大家做一个简单分享~

    1、在master分支下,创建新分支hotfix并切换到hotfix,请在切换之前确认当前分支所有修改已提交干净

    git checkout -b hotfix

    2、在hotfix分支进行相关修改

    vi test.py

    3、修改完毕之后 add commit push

    git add .
    git comit -m "hotfix test"
    git push origin hotfix

    4、切回到master

    git checkout master

    5、合并hotfix到master分支

    git merge hotfix

    6、查看当前git状态

    git status

    7、将合并后内容push到线上master分支

    git push origin master

    8、修补完毕,删除hotfix分支

    git branch -d hotfix

    9、查看当前分支已有tag

    git tag

    10、打新tag(推荐使用带附注型tag,如下)

    git tag -a v0.0.1 -m "标记版本"

    希望对你有帮助~

  • 相关阅读:
    spring mongodb查询
    spring mongodb分页,动态条件、字段查询
    js导航下拉菜单
    spring mongodb增删改查操作
    组件
    vue的基本指令
    远程连接MongoDB数据库
    webpack工具、Vue、react模块化
    layui
    anaconda使用,jupyter notebook的使用方法
  • 原文地址:https://www.cnblogs.com/hcy-fly/p/9010145.html
Copyright © 2020-2023  润新知