zoukankan      html  css  js  c++  java
  • git 合并commit

     git 压缩  git rebase -i HEAD~4

    该命令执行后,会弹出一个编辑窗口,4次提交的commit倒序排列,最上面的是最早的提交,最下面的是最近一次提交

    然后保存退出,git会压缩提交历史,如果有冲突,需要修改,修改的时候要注意,保留最新的历史,不然我们的修改就丢弃了。修改以后要记得敲下面的命令:

    [plain] view plain copy
     
    1. git add .  
    2. git rebase --continue  

    如果你想放弃这次压缩的话,执行以下命令:

    [plain] view plain copy
     
    1. git rebase --abort  

    如果没有冲突,或者冲突已经解决,则会出现如下的编辑窗口:

    [plain] view plain copy
     
    1. # This is a combination of 4 commits.  
    2. # The first commit’s message is:  
    3. add center style indent  
    4.   
    5. # The 2nd commit’s message is:  
    6. add center style  
    7.   
    8. # The 3rd commit’s message is:  
    9. add center style  
    10.   
    11. # The 4th commit’s message is:  
    12. update templates  
    13.   
    14. # Please enter the commit message for your changes. Lines starting  
    15. # with ‘#’ will be ignored, and an empty message aborts the commit.  
  • 相关阅读:
    PHP CI分页类带多个参数
    PHP oracle分页
    PHP 防范IP攻击
    PHP 防范CC攻击
    PHP 防范xss攻击
    html input
    弹框样式
    php最快捷的插入数据,3000万仅需5秒
    phpcms 后台分页
    phpcms 用phpexcel导入导出excel
  • 原文地址:https://www.cnblogs.com/xuzishuai/p/9048850.html
Copyright © 2011-2022 走看看