Git checkout does not change anything

前端 未结 4 526
暗喜
暗喜 2020-12-30 18:47

I really like git. At least, I like the idea of git. Being able to checkout my master project as a separate branch where I can change whatever I want without risk of screw

4条回答
  •  暖寄归人
    2020-12-30 19:14

    I had this issue when I tried to switch temp to another branch from the master branch and when I would change something on that temp page and without committing the changes I would checkout the master branch again, it actually merged all the changes from the TEMP branch into MASTER.

    ANSWER:

    Whenever you checkout to a TEMP branch, COMMIT your changes. That way if you commit them on the TEMP branch and checkout MASTER again, it will work as supposed.

提交回复
热议问题