zoukankan      html  css  js  c++  java
  • merge法

    核心: (master) git merge feature --squash 意思是把feature分支不同于master分支的所有文件罗列出来(无论有几个提交),然后就可以方便的git commit提交了

    #1 创建功能分支 
    (master) git checkout -b feature
    #2 功能迭代 
    (feature) git commit ...
    复制代码
    #3 合并最新主干代码 
    (feature) git checkout master
    (master) git pull
    (master) git checkout feature
    (feature) git merge master
    解冲突 
    (feature) git commit #
    复制代码
    4 review,修改代码 
    (feature) git commit
    复制代码
    5 提交测试通过后,合并到主分支,先执行一遍第3步 #
    把提交合并成一个 
    (feature) git checkout master
    (master) git merge feature --squash
    (master) git commit # 推送到远端,正常结束
    (master) git push origin #
    复制代码
    6 如果上一步被拒绝,是因为master有更新的代码入库了,为了防止master上出现分线,需要重新执行第5步
  • 相关阅读:
    48. Rotate Image
    47. Permutations II
    46. Permutations
    45. Jump Game II
    44. Wildcard Matching
    43. Multiply Strings
    42. Trapping Rain Water
    41. First Missing Positive
    40. Combination Sum II
    39. Combination Sum
  • 原文地址:https://www.cnblogs.com/ithubb/p/13515754.html
Copyright © 2011-2022 走看看