感谢您抽出宝贵时间提供帮助。我是git的新手,但我花了整整两天时间试图解决我的问题。所有我想要的最终是在我的桌面上有一个文件夹,我可以编辑代码并将更改应用到Facebook页面。 每当我解决问题,其他东西都会导致问题,现在它一定是乱七八糟的,所以我将从最后一个问题(错误信息)开始,我的工作回到顶部。 我只是按照这个教程https://devcenter.heroku.com/articles/facebook创建了一个在我的桌面上显示的克隆。当我输入git remote时,我得到了heroku。 但当我键入$ git commit -am“更改问候语”时,我必须分配文件夹boiling-badlands-5761(包含所有文件)以应用更改然后当我输入git push heroku时我得到 !带指纹的钥匙33:91:89:4d:cf:65:b8:31:7d:c8:69:6f:cb:b9:1d:15是 没有被授权访问愤怒的机器人-218。 致命:远程端意外挂断 事情是愤怒的 - 机器人-218是我前一天删除的旧应用程序。 (就像我说我花了相当多的时间搜索和尝试包括创建新应用程序的东西,希望它能给我一个新的开始) 你能告诉我什么命令简单地将所有更改分配到正确的文件夹我做了:git add boiling-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 log
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
你可以帮助我,因为我真的不知道现在在哪里看。我尝试不同的命令越多,我就越搞乱它。
现在我只想将更改分配给正确的文件夹。
提前谢谢
再次感谢
答案 0 :(得分:0)
好的,首先你似乎已经在桌面文件夹中初始化了一个git repo:
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 <jeroe@jeroe-PC.(none)>
首先尝试这些。如果heroku推送问题仍然存在,我们也会解决这个问题,但是直到你得到一个克隆1)不是你的桌面目录,并且2)没有保存提交没有提交者信息,没有任何意义做任何事情其他
上面提到的新克隆后,将沸腾的badlands-5761的内容移入其中。不要移动整个目录,只移动文件。然后,在发出git config
命令后,请尝试新克隆中的git add .
和git commit
。