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.
我太笨了,我提交并推送到服务器,发现提交消息是错误的。所以我使用 --amend 来修复评论。但现在我不能再推送到服务器了:S
该怎么办?
您需要使用 -f 推送来强制推送,因为您正在重写历史:
git push -f origin master