Discuss / Git / 大家可以在这里讨论Git的问题

大家可以在这里讨论Git的问题

其实在最新的xcode里面 不需要到preference找到Command Line Tools 然后下载 直接自带。

= =突然发现以前挺傻 fatal: pathspec 'readme.txt' did not match any files 是因为没有创建那个txt文本 git add不是创建文件 需要本身有这个文本

廖老师您好: Last login: Fri Apr 24 11:19:21 on ttys000 ADIQueendeMacBook-Pro:~ adiqueen$ mkdir gitlearn mkdir: gitlearn: File exists ADIQueendeMacBook-Pro:~ adiqueen$ git init Reinitialized existing Git repository in /Users/adiqueen/.git/ ADIQueendeMacBook-Pro:~ adiqueen$ git add readme.txt fatal: pathspec 'readme.txt' did not match any files ADIQueendeMacBook-Pro:~ adiqueen$ ls Applications Documents Library Pictures gitlearn Conduit Downloads Movies Public learngit Desktop Git Music Workspaces ADIQueendeMacBook-Pro:~ adiqueen$

其中gitlearn是我创建的仓库,但是我执行git add readme.txt的时候也显示这样的错误:fatal: pathspec 'readme.txt' did not match any files请问是怎么回事啊,谢谢您

冰夏22

#25 Created at ... [Delete] [Delete and Lock User]

廖老师 看了你的讲解,我也做到了在版本库里面添加文件,也报出了那个错误出现了这样的错误提示:fatal:pathspec 'readme.txt' did not match any file! 我是windows8 64bit操作系统

是这样子的: $ cd learngit

ami-user@AMI-PC1017 /f/learngit (master) $ ls

ami-user@AMI-PC1017 /f/learngit (master)

$ git add f/readme.txt fatal: pathspec 'f/readme.txt' did not match any files

其中learngit是我在F盘建立的一个版本库

readme.txt是我在F盘里面新建的一个文件,

我想把readme.txt这个文件添加到版本库里面,就报了这个错误

针对

$git add readme.txt
fatal:pathspec 'readme.txt'did not match any fies

的问题解决方法 第一步:

$cd learngit

第二步:

$pwd
/c/file1/file2/learngit

第三步:进入/c/file1/file2/learngit 看是否有readme.txt若没有则在此处新建即可。

若有相同问题可@me

出现fatal:pathspec 'readme.txt' did not match any files,是因为你没有在文件夹右键创建readme文件。。刚才我也遇到这问题,后来想了下解决了。。

love初o雪

#28 Created at ... [Delete] [Delete and Lock User]

现在需要把码云里的项目克隆岛git分支,然后敲代码作业面,但是push提交不上去,而且会报错,已经把公钥弄到码云上了,而且add和commit都正确,错误如下: Zhu@DESKTOP-S2TF3BK MINGW64 /e/Git/zz/Queen (zhu.zhu) $ git push origin zhu.zhu fatal: Authentication failed for 'https://gitee.com/Queen-Project/Queen.git/'

love初o雪

#29 Created at ... [Delete] [Delete and Lock User]

真的真的是各种办法都想了

love初o雪

#30 Created at ... [Delete] [Delete and Lock User]

急需老师帮助

pathspec,,,did not match any files,或许可以 git add readme,而不加.txt后缀。


Reply