Git asks me to commit or stash changes on checkout master, even though all changes were committed?

前端 未结 8 1750
误落风尘
误落风尘 2020-12-28 12:48

I have two branches locally, master and Berislav. The latter is currently active, and I have committed all the changes. When I try to checkout to <

8条回答
  •  春和景丽
    2020-12-28 13:18

    I had a similar problem on a fresh clone. I just forced the checkout with the --force (-f) flag

    git checkout --force some_branch 
    

    Probably not the best way of resolving the issue on a repo that you are making changes to, but in my case I was sure I hadn't made any changes, and just wanted to switch branch.

提交回复
热议问题