V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
xpol
V2EX  ›  git

关于 git subtree push 的 `--squash` 选项。

  •  
  •   xpol · Feb 10, 2015 · 3347 views
    This topic created in 4106 days ago, the information mentioned may be changed or developed.
    我是这样使用subtree的:

    1. 在主仓库中: `git subtree add --prefix=lib http://example.com/lib.git master --squash`。
    2. 在主仓库中:修改了 lib 目录并且添加并提交,记为改动 #1。
    3. 在主仓库中:修改了 lib 目录并且添加并提交,记为改动 #2。
    4. 在主仓库中:push 改动到主仓库。

    现在我想把对 lib 的改动 #1 #2 都原原本本的 push 到 `http://example.com/lib.git`。

    我的问题是我如果 `git subtree push` 的时候带上 `--squash` 选项。
    (因为 SourceTree 在 subtree push 的时候默认会带上 --squash )
    那么,这个 `--squash` :

    * 是否会导致 #1 和 #2 被合并成一个改动?
    * 还是说有其他作用?
    1 replies    2015-02-10 16:39:31 +08:00
    xpol
        1
    xpol  
    OP
       Feb 10, 2015
    居然没人回。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 14:54 · PVG 22:54 · LAX 07:54 · JFK 10:54
    ♥ Do have faith in what you're doing.