Master将未提交的更改提交给Git的新分支 [英] Putting uncommitted changes at Master to a new branch by Git
本文介绍了Master将未提交的更改提交给Git的新分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在分支 master
?
时,如何将未提交的更改放到分支TEST上解决方案
您只需签出测试分支,然后提交。如果您转到其他分支机构,您不会失去无限制的变化。
假设您在主分支机构:
git checkout test
git add。
git add deletedFile1
git add deletedFile2
...
git commit -m我的自定义消息
我对删除的文件并不确定,但我猜测在使用 git add时不包括它们。
How can you put uncommitted changes to a branch TEST when I am at the branch master
?
解决方案
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 .
这篇关于Master将未提交的更改提交给Git的新分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文