我把Test项目上传到github上,为了截一部分图,来写博客。所以我就上传成功之后,把仓库Respository Test删除了,但是当我再次上传的时候,发现上传不上,会提示failed to add file / to index。通过查找一些资料发现,第一次上传的时候,已经创建了一个隐藏的git文件,删除以后再push到github上就可以了。所以找出项目中的隐藏文件,然后删除git文件就行了。

本地使用github时,commit添加到路径中的项目时会提示Github:failed to add file / to index

是因为创建的项目目录里面有个目录曾经创建国项目,里面会有一个隐藏的文件”.git”,删除即可

1)显示Mac隐藏文件的命令:defaults write com.apple.finder    AppleShowAllFiles -bool true

(2)隐藏Mac隐藏文件的命令:defaults write com.apple.finder   AppleShowAllFiles -bool false

Github:failed to add file / to index的更多相关文章

  1. 解决 Github:failed to add file / to index 问题

    参考: Github:failed to add file / to index 解决 Github:failed to add file / to index 问题 在通过Github for Ma ...

  2. fatal: could not read Username for 'https://github.com': No such file or directo

    Git push origin master报错 fatal: could not read Username for 'https://github.com': No such file or di ...

  3. jenkins:配置密钥时报错的解决:Failed to add SSH key. Message invalid privatekey(Jenkins 2.257)

    一,报错的现象: 1,提示信息: jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message ...

  4. backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.

    昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示: <Exec>   <ctx>yMaint.ShrinkLog</ctx> ...

  5. Error Domain=ASIHTTPRequestErrorDomain Code=8 "Failed to move file from"xxx/xxx"to"xxx/xxx"

    今天真的好高兴呀 我解决了一个折磨了我一周的问题,真的是激动地要哭出来了,为了这个问题,我嘴也烂了,头发抓了一地啊.虽然解决方法,最后还是展现出了“百度”的伟大,但是我还是很开心,在这里我展示一下我的 ...

  6. Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案

    我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...

  7. QA:Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, ReasonPhrase:Method Not Allowed.

    QA: Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, Rea ...

  8. Visual Studio发布Web项目报错:Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The specified file could not be encrypted.

    背景 Visual Studio下的Web项目 现象 发布时遇到Unable to add 'xxx' to the Web site.  Unable to add file 'xxx'. The ...

  9. 48.Warning: (vsim-3534) [FOFIR] - Failed to open file "sp_rom_8x256_sr.mif" for reading.

    当在仿真ROM IP核文件时,会出现这种警告,而这种警告的结果是ROM不能输出数据,原因是mif文件要放在modelsim工程文件目录下.类似的,有时候会报错,Failed to open file& ...

随机推荐

  1. Node.js 种子下载器

    Node.js 种子下载器 庆祝 2018 国庆,制作了一个 Node.js 的种子下载器.爬取页面,根据页面的链接,破解另外一个网站,下载种子文件.项目比较简单,爬取页面没有使用任何爬虫框架.项目源 ...

  2. Kubernetes 笔记 04 架构是个好东西

    本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. Hi,大家好, ...

  3. github学习:如何从本地把项目上传到github&&如何把github项目通过clone复制下来,详细教程

    一.第一步---注册一个Github账号 首先要在GitHub上创建一个帐号,可以去官方网站注册一个账号. 前提:本地安装一个git 本人github:https://github.com/saucx ...

  4. MVC的App_Code这个特殊文件夹

    对于一个之前编译一点都没有问题的项目,突然间调试就出现了一个报错: 然而你会天真的认为,这个真的是using的问题吗!别傻了,我检查了一遍又一遍: 首先这个是有using的! 其实代码编写上也是没有报 ...

  5. JDK1.8源码(三)——java.util.HashMap

      什么是哈希表? 在讨论哈希表之前,我们先大概了解下其他数据结构在新增,查找等基础操作执行性能 数组:采用一段连续的存储单元来存储数据.对于指定下标的查找,时间复杂度为O(1):通过给定值进行查找, ...

  6. 【ASP.NET Core快速入门】(四)在CentOS上安装.NET Core运行时、部署到CentOS

    下载.NET Core SDK 下载地址:https://www.microsoft.com/net/download/windows 第一步:Add the dotnet product feed( ...

  7. [八]基础数据类型之Double详解

    Double 基本数据类型double  的包装类 Double 类型的对象包含一个 double 类型的字段   属性简介 用来以二进制补码形式表示 double 值的比特位数 public sta ...

  8. javascript中filter的用法

    filter filter也是一个常用的操作,它用于把Array的某些元素过滤掉,然后返回剩下的元素. 和map()类似,Array的filter()也接收一个函数.和map()不同的是,filter ...

  9. ruby中to_s和to_str、to_i和to_int、to_a和to_ary、to_h和to_hash的解释说明

    包括to_s和to_str.to_i和to_int.to_a和to_ary.to_h和to_hash.统称为to_x和to_xxx. 那么,to_x和to_xxx的区别是什么,什么时候使用to_x,什 ...

  10. Spark框架详解

    一.引言 作者:Albert陈凯链接:https://www.jianshu.com/p/f3181afec605來源:简书 Introduction 本文主要讨论 Apache Spark 的设计与 ...