Answer the question
In order to leave comments, you need to log in
What is the correct way to use the git stash command?
Good evening.
It was necessary to merge with the master branch. Since there were unfinished changes in the merged branch (dev), I used stash.
git stash
git checkout master
git merge dev
git push origin master
git checkout dev
git stash apply --index
Answer the question
In order to leave comments, you need to log in
If you gave an example of what was and what has become, it would be possible to say for sure. But most likely you had a difference of one commit and the fast-forward policy was used during the merge, i.e. just copied a commit from one branch to another. Use the --no-ff option if you don't want this behavior.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question