• 请不要在回答技术问题时复制粘贴 AI 生成的内容
phithon
5.05D
V2EX  ›  程序员

github 以前 commit 的邮箱能改不

  •  1
     
  •   phithon ·
    phith0n · Jun 8, 2015 · 4243 views
    This topic created in 4013 days ago, the information mentioned may be changed or developed.
    以前没注意,个人电脑用git的时候没初始化邮箱。
    commit的时候都用的一个不存在的邮箱,所以github上小方块基本都是白的(有几块有颜色的是另一台笔记本)。
    所以以前提交的还有救没?能改不?
    https://github.com/phith0n
    11 replies    2015-06-11 20:11:00 +08:00
    luin
        1
    luin  
       Jun 8, 2015   ❤️ 1
    9hills
        2
    9hills  
       Jun 8, 2015 via iPhone
    不用改啊,把那个邮件地址加到你的账号里就行了
    phithon
        3
    phithon  
    OP
       Jun 8, 2015
    @9hills 那个是个不存在的邮箱……是mac最早默认的[email protected]这种。。。
    CMGS
        4
    CMGS  
       Jun 8, 2015
    可以,git filter 命令……巨复杂。。。
    Andiry
        5
    Andiry  
       Jun 8, 2015 via Android
    可以,直接发信给客服
    spritevan
        6
    spritevan  
       Jun 9, 2015
    如果确认不会影响其他人的历史
    可以 rebase 回去 reword 修改提交信息
    重新 push
    ychongsaytc
        7
    ychongsaytc  
       Jun 9, 2015 via Android
    @spritevan 这可能是最完美的办法了
    networm
        9
    networm  
       Jun 11, 2015   ❤️ 1
    @phithon 如果你的仓库还没有人使用或者说允许他们重新克隆你的仓库使用的话,你是可以这么做的,否则会很麻烦,很可能出现混乱。

    方法是下面链接中的 Changing E-Mail Addresses Globally 小节
    Git - Rewriting History
    http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
    phithon
        10
    phithon  
    OP
       Jun 11, 2015
    @networm 确实很麻烦。。。我放弃了,。。哭%>_<%
    networm
        11
    networm  
       Jun 11, 2015 via iPhone
    @phithon 如果你的仓库已经有很多人克隆了,基于你做的继续提交,那就不要弄了,否则这个操作本身并不麻烦。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3306 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 70ms · UTC 11:42 · PVG 19:42 · LAX 04:42 · JFK 07:42
    ♥ Do have faith in what you're doing.