Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的客户端上有与签入版本冲突的代码。有没有办法告诉 Git “忽略原始版本并强制我的版本覆盖它”?
是的,您可以使用git push -f命令执行此操作。该-f命令是“强制”选项,它将您当前的 ref 推送到上游,即使您当前的历史记录不是从上游派生的。
git push -f
-f
使用此命令很容易丢失工作。当心。