How can you put uncommitted changes to a branch TEST when I am at the branch master
?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Why not just use git stash. I think it's more intuitive like a copy-and-paste.
You have some files in your current branch that you want to move.
Move to the other branch.
And apply
I also like
git stash
because I usegit flow
, which complains when you want to finish a feature branch whilst having changes still in your working directory.Just like @Mike Bethany, this happens to me all the time because I work on a new problem while forgetting I am still on another branch. So you can stash your work,
git flow feature finish...
, andgit stash apply
to newgit flow feature start ...
branch.Also you can create a new branch and switch to it by doing:
I use this all the time because I always forget to start a new branch before I start editing code.
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:
I am not really sure about the deleted files, but I guess they aren't included when you use
git add .