NonClockworkChen
V2EX  ›  问与答

求指导如何把超前的 HEAD 合并到落后的 master 分支上....

  •  
  •   NonClockworkChen · Sep 28, 2017 · 4771 views
    This topic created in 3330 days ago, the information mentioned may be changed or developed.
    百度了一下,还是缺点什么,不太会弄...

    5 replies  •  2017-09-29 01:16:48 +08:00
    wellsc
    wellsc
    Sep 28, 2017❤️1
    1
    试试 rebase
    faceair
    faceair
    Sep 28, 2017❤️1
    2
    先把没提交的代码 commit 一次,再按一楼说的 rebase 到 upsteam/master
    rashawn
    rashawn
    Sep 28, 2017 via iPhone❤️1
    3
    难道不是 merge 就可以了吗 难道每次合并都是把旧的 Head 合并到新的代码里?
    Muninn
    Muninn
    Sep 28, 2017❤️1
    4
    难道不是 merge 就可以了吗。。。去看 git 基础教程吧
    billlee
    billlee
    Sep 29, 2017❤️1
    5
    你是怎么把 HEAD 移到没有分支的地方的。。。
    git checkout -b develop
    git stash
    git checkout master
    git merge --ff-only upstream/master
    git checkout develop
    git rebase master
    git stash pop
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   907 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 21:10 · PVG 05:10 · LAX 13:10 · JFK 16:10
    ♥ Do have faith in what you're doing.