我正在 Windows 上工作,感谢 git 专业人员对此提供的任何帮助。
PS G:\Solid\WebPortals> git status
On branch pos-event-waiver
nothing to commit, working tree clean
PS G:\Solid\WebPortals> git checkout pos-exchange-bill
error: Your local changes to the following files would be overwritten by checkout:
Site/WebPortals/assets/typescript/pos/cart/waiver.component.ts
Please commit your changes or stash them before you switch branches.
Aborting
您的本地分支 pos-event-waiver 可能未设置为跟踪远程分支。要解决此问题并跟踪主分支,请执行以下操作:
git branch --set-upstream-to origin/master
立即尝试
git status
获取当前分支的状态,然后您可以根据需要提交或存储更改。