感谢您花时间提供帮助。我是 git 的新手,但我花了整整两天的时间来解决我的问题。最后我想要的只是在我的桌面上有一个文件夹,我可以在其中编辑代码并将更改应用到 facebook 页面。每次我解决某些问题时,其他问题都会导致问题,现在它一定是一团糟,所以我将从我遇到的最后一个问题(错误消息)开始,然后回到顶部。我只是按照本教程https://devcenter.heroku.com/articles/facebook我创建了一个在我的桌面上显示的克隆。当我输入 git remote 时,我得到了 heroku。但是当我输入 $ git commit -am "changed greeting" 时,我必须分配文件夹沸腾-badlands-5761(包含所有文件)来应用更改,然后当我输入 git push heroku 时,我得到了!您的指纹为 33:91:89:4d:cf:65:b8:31:7d:c8:69:6f:cb:b9:1d:15 的密钥无权访问 furious-robot-218。致命:远程端意外挂断了事情是 furious-robot-218 是我一天前删除的旧应用程序。(就像我说的,我花了相当多的时间搜索和尝试包括创建新应用程序在内的东西,希望它能给我一个新的开始)你能告诉我简单地将所有更改分配到正确文件夹的命令是什么吗? git add rolling-badlands-5761/ 它给了我:
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 <jeroe@jeroe-PC.(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 you@example.com
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 status 给了我:
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 <jeroe@jeroe-PC.(none)>
Date: Tue Jul 31 18:35:24 2012 +0200
changed greeting
你能帮我吗,因为我现在真的不知道去哪里找。我尝试不同的命令越多,我就越搞砸。现在我只想将更改分配给正确的文件夹。提前致谢
太好了,非常感谢,我只有最后一个重要问题。执行完您说的命令后,它应用了代码,但我想知道是否每次我想编辑代码时都必须重做这些步骤。所以我只是关闭了 cmd 并再次打开以输入 git comit -am 然后 git push heroku 然后再次引用这个名为 furious 机器人的旧应用程序有没有一种方法可以编辑正确的文件夹和代码而无需键入所有命令你给我。因为如果是这样,那将是一项非常非常乏味的工作。
再次感谢