When I began using Git a few months ago in Windows under WAMP, I found it 
very useful to be able to create a new test branch, alter a few lines of 
code and see how it worked out. If it worked well, I would switch back to 
master and merge the test branch into master. If it did not work well, I 
would just abandon the test branch and continue down a new path in master.

Today, I have switched to linux and a may thus have a newer version of Git 
(I honestly don't remember what I had under Windows). I tried the above 
modus operandi and was surprised because it did not work as expected:

- I left master, created a new branch, and checked out that branch. 
- I altered a few lines of code and saved the file. I did not even commit.
- I did not like how it turned out so I switched back to master and to my 
surprise the new lines of code were present in the file I had edited while 
being in the other branch. Master had been polluted by the other branch.

My current Git version i 2.7.4. I tried to find out but can't see if 
something changed in the way Git works. 

I certainly expected my edit not to be in the file once I had switched back 
to master. 

Does anyone understand what is going on? I'd be very grateful for some 
elucidation on this point. 


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to