wxsm

十几年工作经验的老码农,连 git 都不会用。

  •  
  •   wxsm · Sep 30, 2020 · 17364 views
    This topic created in 2226 days ago, the information mentioned may be changed or developed.
    1. 别人的 MergeRequest,都是干干净净,改了文件就是多少个 Change 。他的倒好,每次一上来就几十个 commit,几百个 change,认真一看,也就最上面那几个是他的。
    2. 经常在工位上大喊「我的代码呢」,结果到头来查历史记录往往是被自己根本就没提交,或者被自己干掉了。
    3. 同时也经常干掉别人的代码,自己完全不自知。出了问题,十有八九都是他干的。
    4. 遇到问题就知道喊,有一次自己代码拉不下来了,说别人把 remote 搞坏了,所以自己拉不了了。喊人过去一看,工具上明明白白写着:you are in a middle of rebase,做个 abord 就好了。

    以上只是冰山一角,他写的代码我就懒得说了。我也不是针对谁,就事论事,和这种人共事,就是难受。祝大家都能找到更好的工作,避免遇到这种同事。

    118 replies  •  2020-10-05 11:16:04 +08:00
    1  2  
    ❮ ❯
    sagaxu
    sagaxu
    Sep 30, 2020 via Android❤️1
    101
    完全可以通过流程规避,repo 设置成禁止 force push,禁止非 fast forward push 。

    然后每次有异常的时候,都能轻易查到是谁的锅,截图发大群里
    IMXT
    IMXT
    Sep 30, 2020 via Android
    102
    十几年外包经验?
    Gilfoylek
    Gilfoylek
    Sep 30, 2020
    103
    @sagaxu 问下 为什么要禁止非 fast forward push,那不就成了 svn 了吗?
    sagaxu
    sagaxu
    Sep 30, 2020 via Android
    104
    @Gilfoylek 把太多分支历史信息 merge 到 master 中,commit 历史会很杂乱
    AmrtaShiva
    AmrtaShiva
    Sep 30, 2020 via Android
    105
    @wxsm #14 这是关系户吧
    20015jjw
    20015jjw
    Sep 30, 2020 via Android
    106
    u1s1 用过 hg 之后 真香 git 太难用了
    laike9m
    laike9m
    Oct 1, 2020 via Android
    107
    吐槽同事就说明该换公司了

    这句话我已经讲太多遍了。。
    Felldeadbird
    Felldeadbird
    Oct 1, 2020
    108
    他这种根本不是不会呀。。是根本没学。
    git 本身没严格的流程控制,不熟悉的话,非常容易造成代码丢失。哈哈哈
    kiwier
    kiwier
    Oct 1, 2020 via iPhone
    109
    @aLazarus 哈哈,他也是个人才
    keenkiller
    keenkiller
    Oct 1, 2020 via Android
    110
    2020 年还有人不会用 git,还振振有词说是 git 的问题,真是醉了。v2 综合水平越来越低了…
    macrosea
    macrosea
    Oct 1, 2020 via iPhone❤️1
    111
    底层人踩人,上层人捧人;该醒醒了
    memecoin
    memecoin
    Oct 1, 2020
    112
    码农何必为难码农,公司又不是你开的
    GG668v26Fd55CP5W
    GG668v26Fd55CP5W
    Oct 1, 2020
    113
    多人合作的时候慎用 rebase,因为会重写 commit,导致其他同事需要 re-merge 你的工作,然后你 pull 回来,事情会变得混乱。

    https://git-scm.com/book/en/v2/Git-Branching-Rebasing

    > The Perils of Rebasing

    Ahh, but the bliss of rebasing isn’t without its drawbacks, which can be summed up in a single line:

    Do not rebase commits that exist outside your repository and that people may have based work on.

    If you follow that guideline, you’ll be fine. If you don’t, people will hate you, and you’ll be scorned by friends and family.

    When you rebase stuff, you’re abandoning existing commits and creating new ones that are similar but different. If you push commits somewhere and others pull them down and base work on them, and then you rewrite those commits with git rebase and push them up again, your collaborators will have to re-merge their work and things will get messy when you try to pull their work back into yours.
    GG668v26Fd55CP5W
    GG668v26Fd55CP5W
    Oct 1, 2020
    114
    不要在已发布或者公共的 commit 里 rebase
    babyblue
    babyblue
    Oct 1, 2020 via Android
    115
    然而他脾气还特别大
    ,觉得自己根本没错 😌
    yingqi7
    yingqi7
    Oct 1, 2020 via iPhone
    116
    @nnws2681521 你自己的当然没问题,但是我寻思着团队协作你还能不提交?
    wangzitiansky
    wangzitiansky
    Oct 3, 2020 via Android
    117
    @liulilte 不会还不学就问题很大吧
    MannyWang
    MannyWang
    Oct 5, 2020
    118
    Git 還用專門學?用到看一下不就可以了?
    1  2  
    ❮ ❯
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3131 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 10:42 · PVG 18:42 · LAX 02:42 · JFK 05:42
    ♥ Do have faith in what you're doing.