我有2個需要擺脫的提交。當我做了git的狀態下面是我得到:刪除已被推動但失敗的Git提交
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: Finals/Analysis/.ipynb_checkpoints/Analysis 3-checkpoint.ipynb
deleted: Finals/Analysis/Analysis 1.ipynb
deleted: Finals/Analysis/Analysis 2.ipynb
deleted: Finals/Analysis/Analysis 3.ipynb
deleted: Finals/Analysis/Analysis3_Image/wordcloud.png
deleted: Finals/Analysis/Download API Data.ipynb
no changes added to commit (use "git add" and/or "git commit -a")
我試圖git reset --hard origin/master
肚裏了半個多小時,什麼都不做。
請問,有人可以幫忙嗎? 我有我的文件備份,我很好,如果我可以克隆到我的GITHUB目錄在線以及。
「我已經嘗試過'git reset --hard origin/master',這個過程持續了半個小時......」除非你的版本庫有數百萬個文件,否則系統會出現嚴重錯誤。按Enter鍵後,典型的'git reset --hard'結束。 – torek