Take all my changes on the current branch and move them to a new branch in Git

后端 未结 3 1083
梦谈多话
梦谈多话 2020-12-22 18:30

I started work on what I thought would be a minor bug fix on my master branch. However, it has spiraled out of control to the point where I wish I had created a separate bra

3条回答
  •  感情败类
    2020-12-22 19:05

    If you haven't been committing anything yet, you're already in the right position.

    1. Create a new branch: git checkout -b edge
    2. Your files haven't changed. Just git add what needs to and commit as usual.
    3. When you're done committing on edge, switch back to master with git checkout and git merge edge.

提交回复
热议问题