2

I used the following command to send my local git commit to the server:

git push -u origin my_bransh

How to undo this push?

4

1 回答 1

2

您只需删除远程引用

git push origin :my_branch

或使用当前语法

git push --delete origin mybranch

您还必须从本地 repo 中修剪本地跟踪分支

git remote prune origin

或者按照下面评论中纸杯蛋糕的建议,

git fetch -p
于 2013-08-20T16:43:40.403 回答