Answer the question
In order to leave comments, you need to log in
How to merge branches without losing uncommitted changes?
Good day.
I've been struggling with the problem of the correct solution to the following situation for a long time:
There are 2 branches: master and developer, some changes were committed to the developer, for example, 3 commits. There are uncommitted files in the development, which should be left in the development and not transferred to the master.
When checking out to the master, uncommitted files are transferred, which is undesirable. If you commit them to the development, go to the master and merge, then this commit will get into the master. You can roll it back, but the commit with the merge is rolled back along with it.
What is the best way to solve such a problem?
Answer the question
In order to leave comments, you need to log in
git stash
in the development branchgit stash apply
in the development branchDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question