How do I resolve git saying “Commit your changes or stash them before you can merge”?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git stash git pull <remote name> <remote branch name> (or) switch branch git stash apply --index
The first command stores your changes temporarily in the stash and removes them from the working directory.
The second command switches branches.
The third command restores the changes which you have stored in the stash (the
--index
option is useful to make sure that staged files are still staged).