1. 程式人生 > >刪除github專案失敗時出現:Updates were rejected because the tip of your current branch is behind

刪除github專案失敗時出現:Updates were rejected because the tip of your current branch is behind

刪除github上的專案失敗報錯如下

在這裡插入圖片描述
這是由於我本地的倉庫和遠端github倉庫發生了衝突導致的,解決方法如下

1.強制使用push

  git push -u origin master -f

注意:使用此方法會使遠端的修改丟失,一般是不可取的

2.推送前先將遠端倉庫的修改pull下來,然後在推送

 git pull origin master
 git push -u origin master