This should be an easy one. Seems to be so straight forward that I couldn’t find a simple answer to this.
I’m pretty new to heavy GIT using. I just created another local branch from a existing one to be able to play around.
I checked it out and noticed that local unstaged changes went unchanged when I co the new branch.
What happened there?
Did GIT try to merge my local unstaged changes into the sourcecode of the new branch? What would happen if the sourcecode of the branch I checked out would be completely different from the files I had altered?
Thank You!
If there were conflicts between files changed on the branch you were trying to change to, and unstaged changes in the files in the working directory, Git would refuse to swap branches unless you specified the
-f(force) option, and give you an error about how the checkout would overwrite changes in the working directory.