EDITを取得できません。バックコミット(またはそれらのいずれか)私の最も最近に
奇妙なことに、これはほとんどサブフォルダ
templates
内の新しいリポジトリを初期化したようですが、私はそのようなコマンドを実行したことがわかりません。私はまだ何がうまくいかなかったのか分からない。
自分のプロジェクトでGitを使っていて、うまくいきました。
しかし、今日、私は自分のファイルに戻ることができません。正直なところ、私は理由を知らない。私はいくつかのコミットをしてから、以前のコミットをチェックアウトしたかったので、コミットにはgit checkout
を実行しました。それから、同じコマンドを使用して少し前に戻った。私はgit checkout master
で私の最新のコミットに戻ろうとしましたが、これは何らかの理由で動作しませんでした。私はそれからコマンドを考えてgit checkout head
を試しました。
次に、検索したいくつかの他のコマンドについてヒントを得ました。これは悪いアドバイスとなっている可能性があります。これは私自身のプロジェクトだとうれしいです。
私は今、つまったような気がします。本当に多くはできません。もっと何かをしようと思っています。あなたはおそらく私を助けることができますか?
私は最後のコミット以来、ここにouputfrom端末を含めました。すべての情報を見ることができます。大変申し訳ありませんが、何が間違っているのか分かりません。
➜ templates git:(hello_templates) ✗ gc
[hello_templates 258d27a] add rot13-page
5 files changed, 44 insertions(+), 2 deletions(-)
create mode 100644 appengine/standard/templates/rot13.py
create mode 100644 appengine/standard/templates/templates/rot13.html
➜ templates git:(hello_templates) ✗ gloh
zsh: command not found: gloh
➜ templates git:(hello_templates) glog
➜ templates git:(hello_templates) git checkout 615f292
Note: checking out '615f292'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 615f292... Crappy hard-coded bullshit
➜ templates git:(615f292) glg
➜ templates git:(615f292) glog
➜ templates git:(615f292) git checkout 076887a
Previous HEAD position was 615f292... Crappy hard-coded bullshit
HEAD is now at 076887a... Made form with validation, html-escaping and redirection
➜ templates git:(076887a) git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
➜ templates git:(master) gst
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
➜ templates git:(master) git checkout head
Note: checking out 'head'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 076887a... Made form with validation, html-escaping and redirection
➜ templates git:(076887a) glog
➜ templates git:(076887a) git checkout heada
error: pathspec 'heada' did not match any file(s) known to git.
➜ templates git:(076887a) git checkout head
HEAD is now at 076887a... Made form with validation, html-escaping and redirection
➜ templates git:(076887a) git branch
* (HEAD detached at head)
hello_templates
master
➜ templates git:(076887a) git checkout HEAD
➜ templates git:(076887a) git branch
* (HEAD detached at head)
hello_templates
master
➜ templates git:(076887a) gst
HEAD detached at head
nothing to commit, working tree clean
➜ templates git:(076887a) git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
➜ templates git:(master) git branch
hello_templates
* master
➜ templates git:(master) glog
➜ templates git:(master) owd
zsh: command not found: owd
➜ templates git:(master) pwd
/Users/runarkristoffersen/dropbox/Data/cources/FullStack/googleapps/python-docs-samples/appengine/standard/templates
➜ templates git:(master) gco 615f292
error: pathspec '615f292' did not match any file(s) known to git.
➜ templates git:(master) ✗ git checkout HEAD^
error: pathspec 'HEAD^' did not match any file(s) known to git.
➜ templates git:(master) ✗ git checkout -
error: pathspec '-' did not match any file(s) known to git.
➜ templates git:(master) ✗ git reflog
fatal: your current branch 'master' does not have any commits yet
➜ templates git:(master) ✗ git checkout $(git log --branches -1 --pretty=format:"%H")
fatal: your current branch 'master' does not have any commits yet
fatal: You are on a branch yet to be born
➜ templates git:(master) ✗ gb
➜ templates git:(master) ✗ git branch
➜ templates git:(master) ✗ glog
fatal: your current branch 'master' does not have any commits yet
テンプレートフォルダに '.git'が見つかりました。どのようにそこに着いたのかわからない、私はこれを引き起こす端末履歴に何も見ることができません。たぶん、この質問は、十分に広くないので閉じてください。 – Runar
@RunarTrollet no:あなたは答えを受け入れることができます(http://stackoverflow.com/help/accepted-answer)私は答えを編集しました。 – VonC