[Ilugc] [ilugc] Doubt in Git stashing

  • From: priyacst@xxxxxxxxx (Priya K)
  • Date: Mon, 24 Aug 2015 16:50:20 +0530

Hello everyone,

I have a doubt in git stashing. Pls help to find it out.

I have narrated the doubt as follows:

Say, first I have some commits in my *master* branch.
Now I create a branch named *new*.
I do some changes in *new* branch.

Now I want to checkout to *master* branch without committing the changes.
So when I checkout, it should show an error for stashing. But no error
occurs, it checked-out to *master* branch.

Actually,
First I have to do a commit in *new* branch. Then I do some changes in a
file. In this case only, when I try to checkout, an error occurs for
stashing.

I don't know why a commit is necessary before stashing.

-----
Regards,
Priya K

Other related posts: