echo Hello. > a.txt
git add .
echo Bye. >> a.txt
git status -s
>>> AM
We can see state is AM,
But on doing the following
git stash
git stash pop
git status -s
>>> A
State is A.
Why is the M state lost?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
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.
It is the expected behavior. To reconstruct it as you expect (save A & M) use
From documentation: