zoukankan      html  css  js  c++  java
  • git push rejected

    在ideal里面突然无法提交代码了

    于是使用命令行:

    git push;

    报错:

    写入对象中: 100% (30/30), 3.62 KiB | 928.00 KiB/s, 完成.
    总共 30 (差异 13),复用 0 (差异 0)
    remote: ======================================================================
    remote: git log 中发现 yinfuqing@163.com 邮箱不符合要求,请务必使用公司邮箱。
    remote: 请再项目下面设置正确 Git 提交信息:
    remote: 
    remote:   git config user.name 'fuqing.yfq'
    remote:   git config user.email 'fuqing.yfq@alibaba-inc.com'
    remote:   git-m
    remote: 
    remote: 后面一个指令使用了 git-m 命令自动修改 log 信息,获得 git-m 方法:
    remote: 
    remote:   Redhat:
    remote:     sudo yum install git-m -b test -y
    remote:   Windows:
    remote:     在 msysgit 的命令行中运行:
    remote:     curl http://openbase.cn-hangzhou.oss.aliyun-inc.com/git-m -o git-m
    remote:   Mac OS X :
    remote:     curl  http://openbase.cn-hangzhou.oss.aliyun-inc.com/git-m -o /usr/local/bin/git-m
    remote:     chmod 775  /usr/local/bin/git-m
    remote: 
    remote: 详细参阅: http://baike.corp.taobao.com/index.php/Git-m
    remote: 
    remote: 如果是开源项目,请联系项目的管理员去掉项目的 Email 验证限制
    remote: 
    remote: ======================================================================

    方法上面已经写的很清楚了:

    先获取权限:

    curl  http://openbase.cn-hangzhou.oss.aliyun-inc.com/git-m -o /usr/local/bin/git-m
        chmod 775  /usr/local/bin/git-m

    然后执行:

    git config user.name 'fuqing.yfq'
    git config user.email 'fuqing.yfq@alibaba-inc.com'
     git-m

    然后让你输入错误的邮箱:

     mz-pms git:(feature/20200603_6740850_mahua_add_venue_1) ✗ git config user.name 'fuqing.yfq'
    ➜  mz-pms git:(feature/20200603_6740850_mahua_add_venue_1) ✗ git config user.email 'fuqing.yfq@alibaba-inc.com'
    ➜  mz-pms git:(feature/20200603_6740850_mahua_add_venue_1) ✗ git-m
    Input the wrong email that you want to fix(yinfuqing@163.com)?yinfuqing@163.com
    Input the correct username(): fuqing.yfq
    Input the correct email(): fuqing.yfq@alibaba-inc.com
    e[1;32mINFO:e[0mI will changed yinfuqing@163.com to fuqing.yfq <fuqing.yfq@alibaba-inc.com>
    WARNING: git-filter-branch has a glut of gotchas generating mangled history
             rewrites.  Hit Ctrl-C before proceeding to abort, then use an
             alternative filtering tool such as 'git filter-repo'
             (https://github.com/newren/git-filter-repo/) instead.  See the
             filter-branch manual page for more details; to squelch this warning,
             set FILTER_BRANCH_SQUELCH_WARNING=1.
    Proceeding with filter-branch...
    
    Found nothing to rewrite

    就可以了

     
  • 相关阅读:
    169_Majority Element
    171_Excel Sheet Column Number
    217_Contains Duplicate
    242_Valid Anagram
    【findIndex】根据数组对象某一元素的id,找到此元素在数组所在的位置
    【鼠标右击组件】v-contextmenu
    【 拖拽组件】基于 Sortable.js 的 Vue 拖拽组件。 访问地址:Vue.Draggable
    【vue-markdown编辑器】vue-markdown 组件github地址
    mac下如何制作windows启动盘
    【vue webstorm】WebStorm Vue代码格式错误
  • 原文地址:https://www.cnblogs.com/aspirant/p/13079539.html
Copyright © 2011-2022 走看看