zoukankan      html  css  js  c++  java
  • 日常git命令

    #### 合并分支:
    1丶合并前把develop分支rebase/merge到feature分支,自测后,再发合并请求。
    这样做主要是考虑到: `feature分支合并到develop分支后,可能会出现冲突,把冲突在feature分支解决,尽量减少feature合并到develop分支后的冲突。其他考虑点暂时没想到......`

    2、
    git pull的默认行为是git fetch + git merge,
    git pull --rebase则是git fetch + git rebase.

    git rebase --abort 会回到rebase操作之前的状态,之前的提交的不会丢弃;
    git rebase --skip 则会将引起冲突的commits丢弃掉;
    git rebase --continue 用于修复冲突,提示开发者,一步一步地有没有解决冲突,fix conflicts and then run "git rebase --continue"

    3、基于develop分支建立feature分支
    - 第一步.在分支develop,拉取最新代码
    git pull
    - 第二步.查看分支
    git branch
    - 第三步.建立feature分支
    git branch feature_1234
    - 第四步.推送feature分支到远程
    git push origin feature_1234:feature_1234
    - 第五步.查看所有分支
    git branch -a

    4、合并分支feature到develop

    5、
    git remote prune origin
    删除本地有但在远程库已经不存在的分支

    [在MSys版的Git中使用git pull --rebase进行代码更新到底是做了什么?](https://www.zhihu.com/question/23586864)

  • 相关阅读:
    脚本
    vim 马哥
    动态删除节点
    动态插入节点
    动态创建内容
    获取html元素内容
    设置元素的属性
    获取元素的属性
    jquery中:input和input的区别
    jQuery选择器总结
  • 原文地址:https://www.cnblogs.com/ningyanbo/p/8120618.html
Copyright © 2011-2022 走看看