[Ilugc] [ilugc] Doubt in Git stashing

  • From: sahasr@xxxxxxxx (Sahasranaman M S)
  • Date: Mon, 24 Aug 2015 23:15:02 +0530

I think you will get an error only if there is a conflict between the two
branches.   Let's say there are two files A and B in master.  You create
branch new, change file A,  then try to change branch,  it would let you,
and carry over the changes to the checked out master branch.

But if you have changed file A in branch new, committed it, then changed it
again,  then try to switch branch,  it won't let you because the change
cannot be carried over because the two branches have different versions of
file A.

Regards,
Sahas
On 24-Aug-2015 22:41, "Priya K" <priyacst at gmail.com> wrote:

Actually there is no problem because of this issue.
I just want to know why it happens and what is the logic.

On Mon, Aug 24, 2015 at 10:36 PM, Priya K <priyacst at gmail.com> wrote:

Actually I understand the process of stashing.

If we work in a remote repository, this doubt will not arise. But I have
the git repository in my local machine.

When I switch one branch to other branch, if the changes are not
committed, it should show the error "Please, commit your changes or stash
them before you can switch branches".

But in my case that error didn't occur. I understand that without the
error also we can stash the changes.

Actually only this happens when we create and edit any new branches. Once
a branch is ready with some commits, then there is no problem.

Pls try it with your local machine.

On Mon, Aug 24, 2015 at 7:28 PM, Manokaran K <manokaran at gmail.com>
wrote:

Its likely that the changes you have made in the new branch is not in an
already tracked file.
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines




--
Regards,
*K. Priya*
*Spoken Tutorial Project*
http://spoken-tutorial.org
*IIT Bombay*




--
Regards,
*K. Priya*
*Spoken Tutorial Project*
http://spoken-tutorial.org
*IIT Bombay*
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Other related posts: