2012-07-31 78 views
0

感謝您抽出寶貴時間提供幫助。我是一個新手,但我花了整整兩天的時間來解決我的問題。我最後想要的是在我的桌面上有一個文件夾,我可以編輯代碼並將更改應用到Facebook頁面。 每次我解決某件事情,其他事情都會導致問題,現在它一定是一團糟,所以我會從最後一個問題開始(錯誤信息),並且回到頂端。 我只是簡單地按照這個教程https://devcenter.heroku.com/articles/facebook,我創建了一個克隆,顯示在我的桌面上。當我輸入git remote時,我得到了heroku。 但是當我輸入$ git commit -am「更改問候語」時,我不得不指定文件夾沸騰badlands-5761(包含所有文件)來應用更改,然後當我輸入git push heroku時,我得到 !帶有指紋33:91:89:4d:cf:65:b8:31:7d:c8:69:6f:cb:b9:1d:15的密鑰是 未授權訪問furious-robot-218。 致命:遠端意外掛斷 事情是憤怒 - 機器人-218是一個我前一天刪除的舊應用程序。 (就像我說過的,我花了相當長的時間來搜索和嘗試一些東西,包括創建新的應用程序,希望它能給我一個新的開始) 你能告訴我什麼是命令,將所有更改簡單地分配給正確的文件夾我做到了:git的加水煮,荒地-5761/ ,它給了我:git,錯誤地引用舊的已刪除應用程序

  C:\Users\jeroe\Desktop>git add boiling-badlands-5761/ 
      C:\Users\jeroe\Desktop>git status 
      # On branch new-main-branch 
      # 
      # Initial commit 
      # 
      # Changes to be committed: 
      # (use "git rm --cached <file>..." to unstage) 
      # 
      #  new file: boiling-badlands-5761/.gitmodules 
      #  new file: boiling-badlands-5761/AppInfo.php 
      #  new file: boiling-badlands-5761/Readme.md 
      #  new file: boiling-badlands-5761/channel.html 
      #  new file: boiling-badlands-5761/images/fpo-picture.gif 
      #  new file: boiling-badlands-5761/images/get-started-bg.jpg 
      #  new file: boiling-badlands-5761/images/header-sketch.png 
      #  new file: boiling-badlands-5761/images/picture-sketch.png 
      #  new file: boiling-badlands-5761/images/samples-bg.png 
      #  new file: boiling-badlands-5761/images/sprites.png 
      #  new file: boiling-badlands-5761/index.php 
      #  new file: boiling-badlands-5761/javascript/jquery-1.7.1.min.js 
      #  new file: boiling-badlands-5761/stylesheets/base.css 
      #  new file: boiling-badlands-5761/stylesheets/mobile.css 
      #  new file: boiling-badlands-5761/stylesheets/reset.css 
      #  new file: boiling-badlands-5761/stylesheets/screen.css 
      #  new file: boiling-badlands-5761/utils.php 
      # 
      # Untracked files: 
      # (use "git add <file>..." to include in what will be committed) 
      # 
      #  Any Video Converter Professional.lnk 
      #  Audacity.lnk 
      #  Continuer l'installation Daemon Tools Lite.lnk 
      #  GoldWave.lnk 
      #  Notepad++.lnk 
      #  cmd.exe 
      #  desktop.ini 

然後

  C:\Users\jeroe\Desktop>git commit -am "changed greeting" 
      [new-main-branch (root-commit) dc24904] changed greeting 
      Committer: unknown <[email protected](none)> 
      Your name and email address were configured automatically based 
      on your username and hostname. Please check that they are accurate. 
      You can suppress this message by setting them explicitly: 
       git config --global user.name "Your Name" 
       git config --global user.email [email protected] 
      After doing this, you may fix the identity used for this commit with: 
       git commit --amend --reset-author 
      17 files changed, 924 insertions(+), 0 deletions(-) 
      create mode 100644 boiling-badlands-5761/.gitmodules 
      create mode 100644 boiling-badlands-5761/AppInfo.php 
      create mode 100644 boiling-badlands-5761/Readme.md 
      create mode 100644 boiling-badlands-5761/channel.html 
      create mode 100644 boiling-badlands-5761/images/fpo-picture.gif 
      create mode 100644 boiling-badlands-5761/images/get-started-bg.jpg 
      create mode 100644 boiling-badlands-5761/images/header-sketch.png 
      create mode 100644 boiling-badlands-5761/images/picture-sketch.png 
      create mode 100644 boiling-badlands-5761/images/samples-bg.png 
      create mode 100644 boiling-badlands-5761/images/sprites.png 
      create mode 100644 boiling-badlands-5761/index.php 
      create mode 100644 boiling-badlands-5761/javascript/jquery-1.7.1.min.js 
      create mode 100644 boiling-badlands-5761/stylesheets/base.css 
      create mode 100644 boiling-badlands-5761/stylesheets/mobile.css 
      create mode 100644 boiling-badlands-5761/stylesheets/reset.css 
      create mode 100644 boiling-badlands-5761/stylesheets/screen.css 
      create mode 100644 boiling-badlands-5761/utils.php 

git的狀態給我的是:

  C:\Users\jeroe\Desktop>git status 
      # On branch new-main-branch 
      # Untracked files: 
      # (use "git add <file>..." to include in what will be committed) 
      # 
      #  Any Video Converter Professional.lnk 
      #  Audacity.lnk 
      #  Continuer l'installation Daemon Tools Lite.lnk 
      #  GoldWave.lnk 
      #  Notepad++.lnk 
      #  cmd.exe 
      #  desktop.ini 
      nothing added to commit but untracked files present (use "git add" to track) 

和Git日誌

  C:\Users\jeroe\Desktop>git log 
      commit dc2490455c28f930c9395e793cc4e93265cabde6 
      Author: unknown <[email protected](none)> 
      Date: Tue Jul 31 18:35:24 2012 +0200 
       changed greeting 

你能幫助我,因爲我真的不知道現在在哪裏看。越多我嘗試不同的命令越多,我搞砸了。 現在我只想將更改分配給正確的文件夾。 由於事先


那偉大非常感謝你,我只是還有最後一個重要的問題。在執行了你所說的命令之後,它應用了代碼,但是我想知道是否每次我想要編輯代碼時都必須重做這些步驟。所以我只是關閉cmd並再次打開進入git comit -am然後git push heroku,然後再次提到這個舊的應用程序叫做憤怒的機器人 有沒有辦法編輯正確的文件夾和代碼,而不必鍵入所有你給我的命令。因爲如果是這樣的話,這將是非常非常枯燥的工作。

再次感謝

回答

0

好吧,首先你似乎在你的桌面文件夾已初始化的混帳回購協議:

C:\Users\jeroe\Desktop>git add boiling-badlands-5761/ 
C:\Users\jeroe\Desktop>git status ;# this returns output 

這是不是你想要做什麼。嘗試使用git clone命令mentioned in the heroku docs here首先,然後將cd克隆到該目錄中。其次,你做任何事情之前,發出這些命令(當然取代<Your_Name><your_email>您的姓名和電子郵件,分別):

git config --global user.name "<Your_Name>" 
git config --global user.email <your_email> 

這將防止「作者不詳」提交問題,您所遇到下一個:

Author: unknown <[email protected](none)> 

請先嚐試這些。如果heroku推問題仍然存在,我們也會解決這個問題,但是除非你有一個克隆,這個克隆不是你的桌面目錄,並且2)沒有提交者信息的情況下不保存提交,那麼在做任何事情都沒有意義其他。

一旦你有了上面提到的新克隆,將沸騰的荒地5761的內容移入它。不要移動整個目錄,只是文件。然後,在發出git config命令之後,請嘗試從新克隆中的git add .git commit

+0

對不起,這可能聽起來很愚蠢,但你是什麼意思,然後「克隆它後cd目錄」。我不想成爲一個痛苦,我只是害怕如果我錯過了一步就把它弄得更糟。謝謝 – 2012-07-31 19:58:36

+0

不用擔心;你不是一個痛苦。 'cd'是一個終端命令。所以在你發出'git clone'後,你想改變目錄(即'cd')到那個目錄中。在你的情況下,它可能會在你的終端中出現「cd boiling-badlands-5761 /'。 – Christopher 2012-07-31 21:28:17

+0

多數民衆贊成在此非常感謝你,我只是有最後一個重要的問題。在執行了你所說的命令之後,它應用了代碼,但是我想知道是否每次我想要編輯代碼時都必須重做這些步驟。所以我簡單地關閉了cmd並再次打開進入git comit -am,然後git push heroku,然後再次提到這個名爲furious robot的舊應用程序,可以編輯正確的文件夾和代碼,而無需鍵入所有命令你給我。因爲如果是這樣的話,這將是非常非常枯燥的工作。 再次感謝 – 2012-08-01 11:18:54

相關問題