D
D
Dmitry2019-05-13 21:33:05
git
Dmitry, 2019-05-13 21:33:05

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

After that performed
git push origin master
git checkout dev
git stash apply --index

All hidden files returned to their places, but when merging, it was not offered to write a message in the commit and the merging of the master and dev branches is not displayed in the history.
What have I done wrong? How should it be right?
ps Another question, how to make a branch from hidden files? I want to move them to another branch, suspend work on them. Work in dev. When it comes to the hidden files, make changes to them and merge them with dev. There will be conflicts, as I understand it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitsliputsli, 2019-05-13
@slo_nik

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 question

Ask a Question

731 491 924 answers to any question