如何使用深层的文件夹将文件添加到github.com存储库中?
我们可以通过其他方式做到吗?
在后叉中克隆:
C:\>git clone https://github.com/orynider/premod.git
Cloning into 'premod'...
remote: Enumerating objects: 9599, done.
Receiving objects: 98% (9408/9599), 3.71 MiB | 2.47 MiB/s remote: Total 9599 (d
Receiving objects: 99% (9504/9599), 3.71 MiB
Receiving objects: 100% (9599/9599), 5.08 MiB | 2.47 MiB/s, done.
Resolving deltas: 100% (6413/6413), done.
Checking out files: 100% (1417/1417), done.
C:\>git add .
fatal: Not a git repository (or any of the parent directories): .git
C:\>cd premod
C:\premod>git add .
C:\premod>git commit -m"Adding phpBB Area-51 Favicon.ICO"
[3.0.x 034bf53] Adding phpBB Area-51 Favicon.ICO
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 premod/root/favicon.ico
C:\premod>git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/orynider/premod.git'
C:\premod>git pull origin master
fatal: Couldn't find remote ref master
C:\premod>git push origin master
答案 0 :(得分:0)
您需要输入刚克隆的项目的目录:
cd premod
然后您使用任何git命令。
编辑1:
关于第二个问题,该项目没有master分支。 检查可用的分支并在推或拉时写下其名称。