Putting uncommitted changes at Master to a new branch by Git

后端 未结 4 674
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 02:03

How can you put uncommitted changes to a branch TEST when I am at the branch master?

4条回答
  •  我在风中等你
    2021-01-30 02:23

    You can just checkout to the test branch and then commit. You don't lose your uncommited changes when moving to another branch.

    Supposing you are at the master branch:

    git checkout test
    git add .
    git add deletedFile1
    git add deletedFile2
    ...
    git commit -m "My Custom Message"
    

    I am not really sure about the deleted files, but I guess they aren't included when you use git add .

提交回复
热议问题