こんにちは私は本当に奇妙な問題があります。NetBeamsでGitHubのマージしたソースファイルを削除
私はこのGitHubのすべてのものに本当に新しいので、いくつかのものを試していました。 基本的に何が起こったのですか、私はNetbeamsのプロジェクトを持っていて、私のGitHubを投稿したかったのです。だからGithubのリポジトリを作成し、それにファイルを追加したかったのです。
私はNetbeamsに入り、Gitリポジトリを初期化しました。 その後、私はGitに行きました - > Commit その後、私はすべてのものをプッシュしようとしましたので、リモート - >プッシュ 何がうまくいかないのか分からず、何かがマスター - >マスターかsometigそういうわけで、今は分かりません。
しかし、事実は失敗しました。だから私は何とかプルをするのはいいアイデアだと思っています。これはまた、それが間違っていた場所です。すべてのものをクリックして終了したら、Rebase/Mergeしたいかどうか聞いてきたウィンドウがありました。 Rebaseをクリックしました。その後、別のウィンドウがポップアップしてチェックアウトの競合について何かを伝えていたので、私は[元に戻す]をクリックして突然私のファイルがなくなった。
私はこれを再現することができました。基本的に私はプロジェクトを持っていて、GitHubで私の空のプロジェクトからプルします。私のファイルを元に戻す方法はありますか?
EDIT:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: nbproject/private/private.xml
Untracked files:
(use "git add <file>..." to include in what will be committed)
nbproject/project.properties
no changes added to commit (use "git add" and/or "git commit -a")
chceckoutメッセージ:コンソール
4b83b06 (HEAD -> master, origin/master) [email protected]{0}: pull --no-rebase --progress origin: Fast-forward
d47acf2 [email protected]{1}:
4b83b06 (HEAD -> master, origin/master) [email protected]{2}: commit: Wa
d47acf2 [email protected]{3}: checkout: moving from HEAD to master
d47acf2 [email protected]{4}: checkout: moving from master to origin/master
d47acf2 [email protected]{5}: rebase finished: returning to refs/heads/master
d47acf2 [email protected]{6}: checkout: moving from master to d47acf26594fc3d07b7709ff38a56284267ab993
330a8a3 [email protected]{7}: commit (initial):
Gitリポジトリstausからの出力ファイルを取り戻すため
$ git checkout 330a8a3
error: Your local changes to the following files would be overwritten by checkout:
nbproject/private/private.xml
Please commit your changes or stash them before you switch branches.
error: The following untracked working tree files would be overwritten by checkout:
nbproject/project.properties
Please move or remove them before you switch branches.
Aborting
端末を開きます。 'git reflog'と入力すると、rebase前の前回のコミットの' git checkout'が返されます – merlin2011
Windowsで何とかできますか? –
GitはWindows上で動作します。すべてのコマンドはWindowsでも実行されます。私はWindows上で 'git-bash'を覚えています。 – merlin2011