search

Home  >  Q&A  >  body text

Git merge history specifies multiple commits

If I have 2000 commits in a warehouse, is there a way to merge the 1st to 1000th commits into one commit?
It’s okay to manually reset and then stash 10 pieces, but a large number is not appropriate!

天蓬老师天蓬老师2826 days ago733

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:31:08

    If you are merging consecutive commits, git rebase -i is more suitable. Mark the commit as squash to merge it into the previous commit.

    reply
    0
  • 某草草

    某草草2017-05-02 09:31:08

    There is a way, I suggest you watch Cherry Picking $ git cherry-pick You should understand

    Reference link: http://blog.csdn.net/wh_19910525/article/details/7554430

    Hope it helps~ :)

    reply
    0
  • Cancelreply