Git: How to rebase and squash commits from branch to master?

前端 未结 2 1610
慢半拍i
慢半拍i 2021-01-31 18:25

I\'m trying to rebase and squash all my commits from current branch to master. Here is what I\'m trying to do:

git checkout -b new-feature

make

2条回答
  •  甜味超标
    2021-01-31 18:45

    When rebasing, Git will not move commits to another branch. It will move the branch including all its commits. If you want to get the commits into master after rebasing on top of it, use git merge to fast-forward the master branch to that commit.

提交回复
热议问题