zoukankan      html  css  js  c++  java
  • [Git] Cherry pick

    For example we have:

    • develop branch
    • hotfix branch
    • release branch

    'develop' branch has all the latest commits and features; 'release' branch is far behand 'develop' branch.

    Now we found a bug which is important to fix it now in our production.

    'hotfix' based on 'develop' branch, contains all new features so we cannot just merge 'hotfix' branch into 'release' branch, otherwise, some new & untested features lack into production.

    What we can do is using 'cherry-pick':

    1. we can find all the commit id which releated to 'hotfix'

    Then apply cherry-pick to our release branch:

    git checkout release
    git cherry-pick <commit-id>

    It ensures we only get the changes we did for hotfix, not anything else we didn't touch.

  • 相关阅读:
    Redis数据类型
    Linux配置Redis
    Linux配置ActiveMQ
    Linux配置Docker
    3、Spring Boot日志
    2、Spring Boot配置
    1. Spring Boot入门
    Linux(centos6.8)配置Redis
    okhttp禁止重定向
    123
  • 原文地址:https://www.cnblogs.com/Answer1215/p/10309383.html
Copyright © 2011-2022 走看看