git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
longxi
V2EX  ›  git

关于 --no-ff 的使用技巧

  •  
  •   longxi · Nov 15, 2011 · 5619 views
    This topic created in 5294 days ago, the information mentioned may be changed or developed.
    git合并分支时没有默认启用这个选项,而有的教程则推荐使用,比如http://blog.leezhong.com/translate/2010/10/30/a-successful-git-branch.html,那什么情况下使用比较适合呢?
    4 replies    1970-01-01 08:00:00 +08:00
    yesmeck
        1
    yesmeck  
       Nov 15, 2011
    教程里写了

    —no-ff (译者注:no fast foward)标签,使得每一次的合并都创建一个新的commit记录。即使这个commit只是fast-foward,这样可以避免丢失信息

    这样就能把你的分支合并情况也记录下来了,如果不用--no-ff直接fast foward的话,以后看日志就看不到当初建这个分支的历史了。

    LZ如果要使用那个教程的分支流程的话可以直接用这个https://github.com/nvie/gitflow
    9hills
        2
    9hills  
       Nov 15, 2011 via Android
    黑客志上有篇讲git工作流的对这个回答的很好。你g一下
    longxi
        3
    longxi  
    OP
       Nov 15, 2011
    谢谢,黑客志那篇文章我也看过,估计我实际多用用就会更明白了。
    Kenyth
        4
    Kenyth  
       Nov 15, 2011
    其实,研究一下 git.git 的 log 和 man gitworkflows 能知道不少。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6129 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 06:12 · PVG 14:12 · LAX 23:12 · JFK 02:12
    ♥ Do have faith in what you're doing.