0
請!我一整天都沒有工作。GitHub刪除了我以前的提交
我創建了一個github倉庫...我一直在工作整天做git add -A並承諾但我從來沒有推過。我直接在頁面上更改了自述(不知道我將會遇到合併這些分支的問題)。
當我試圖讓混帳推後了一整天的韓方以下事情發生了:
To https://github.com/NEGU93/Steganography.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/NEGU93/Steganography.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
所以,我想TA git pull --rebase
但它開始崩潰了一些事情,我不知道它是什麼:
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/NEGU93/Steganography
6161279..44d1f0f master -> origin/master
0 [main] expr 8516 open_stackdumpfile: Dumping stack trace to expr.exe.stackdump
0 [main] cat 15632 open_stackdumpfile: Dumping stack trace to cat.exe.stackdump
0 [main] rm 4660 open_stackdumpfile: Dumping stack trace to rm.exe.stackdump
^C
我把Ctrl + C來停止crashin那裏。所以我做了一個git fetch
,然後我工作的混帳推:
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use
git push origin HEAD:<name-of-remote-branch>
所以,我做的建議,並提出了混帳推到大師:
git push origin HEAD:master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.49 KiB | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To https://github.com/NEGU93/Steganography.git
44d1f0f..c3b8393 HEAD -> master
但現在,當我回來的工作不存在...幫助!我不知道該怎麼做,我開始恐慌。我認爲問題在於使用git fetch。有沒有辦法讓我所有的工作回來?