Why does uncommitted change in a branch affect the master branch?

后端 未结 2 827
清酒与你
清酒与你 2021-02-14 23:06

I am new to git and I am trying to experiment with it to understand the concepts particularly the branching and merging.

So here is my set up,

I have a master br

2条回答
  •  梦如初夏
    2021-02-14 23:36

    In Git or any version control system all the merge operations are to be done on the local machine itself. So, if you have any uncommitted changes on any branch so that they don't get lose/unnoticed they are merged with branch just switched/new checkout. Your changes will always be there unless you use git push. Ofcourse, there could have been a reverse case as well, but it is often more beneficial for the programmer.

提交回复
热议问题