2017-07-06 9 views
0

してください!私はすべての日の仕事を失った。GitHubは私の前のコミットを削除しました

私はgitubリポジトリを作成しました...私はgit add -Aを実行して終日働いていますが、決してプッシュしませんでした。私はページ上で直接readmeを変更しました(私はそれらの同じブランチをマージするのに問題があるとは知らなかった)。

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. 

は、だから私は git pull --rebase taを試みたが、それは、私はそれが何であるかわからないいくつかのことをクラッシュ開始しました::

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 
を、私は一日の韓国以下が起こった後にgitのプッシュを作ってみました

私はそこにクラッシュを止めるためにCtrl + Cを押します。だから私は、その後git fetchと私の仕事のGitのプッシュをした:

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のプッシュをしたようでした:

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であると思う。すべての私の仕事を取り戻す方法はありますか?過去を参照するには

答えて

0

使用git reflogがコミットし、例えばハードをリセットするためのコミットハッシュを使用:

git reset --hard e870e41 

How can I recover a lost commit in Git?

を参照してください。
関連する問題