Merge up to a specific commit

后端 未结 4 1891
旧巷少年郎
旧巷少年郎 2020-11-29 14:59

I created a new branch named newbranch from the master branch in git. Now I have done some work and want to merge newbranch to m

4条回答
  •  情书的邮戳
    2020-11-29 15:17

    Sure, being in master branch all you need to do is:

    git merge 
    

    where commit-id is hash of the last commit from newbranch that you want to get in your master branch.

    You can find out more about any git command by doing git help . It that case it's git help merge. And docs are saying that the last argument for merge command is ..., so you can pass reference to any commit or even multiple commits. Though, I never did the latter myself.

提交回复
热议问题