Save Changes Git stash

3

Because when I create a stash in git to save my changes it is created, but it still keeps changing me and with this I can not change branches, to create another and clean the branch?

    
asked by user103590 15.10.2018 в 19:17
source

1 answer

0

According to the git stash documentation, the save command is deprecated, but in any case is synonymous with push . And if you look at the documentation, git stash push expects the name of a path (that is, a file or a folder) and not the name of a stash.

So if you're putting something like:

git stash save -u mi_stash

will create a stash without a name (but with a hash so you can refer to it), and will put in the stash all the contents of the mi_stash folder, which probably does not exist , which explains that nothing is saved.

Try to simply put git stash push -u without further arguments. The option -u by the way is so you also save the untracked files (that is, they are not under version control). I do not see it necessary in principle to do that, because those files will not normally be touched by git anyway when you do a checkout .

    
answered by 15.10.2018 в 20:45