If you're using Windows it will not let you create a file without a filename in Windows Explorer. It will give you the error "You must type a file name" if you try to rename a text file as .gitignore

To get around this I used the following steps

  1. Create the text file gitignore.txt
  2. Open it in a text editor and add your rules, then save and close
  3. Hold SHIFT, right click the folder you're in, then select Open command window here
  4. Then rename the file in the command line, with ren gitignore.txt .gitignore

无法创建.gitignore文件,提示必须输入文件名称的更多相关文章

  1. windows 如何创建.gitignore 文件 / .ssh 文件夹?解决windows必须键入文件名提示

    windows不允许.gitignore之类的文件,也不允许.ssh命名的文件夹名.会提示必须输入文件名. 要解决这个问题我以前一直是通过bash使用linux命令创建的.最近发现了一个更简便的方法与 ...

  2. 第三篇--创建.gitignore文件

    小知识 ·  git add -A  提交所有变化 ·  git add -u  提交被修改(modified)和被删除(deleted)文件,不包括新文件(new) ·  git add .  提交 ...

  3. 如何创建.gitignore文件

    为什么要创建.gitignore文件? 因为.gitignore可以排除提交时携带的不必要文件,比如Java中的.class文件.同时还可以排除其他不想提交或者提交没这个必要的文件等等. 创建步骤如下 ...

  4. window 上创建 .gitignore文件

    由于 git默认不上传空文件夹,如果需要上传空文件夹,那么需要这样上传空文件,官方给出这样的做法~~ (需要创建.gitignore文件) 在linux 上比较好操作了,这里说下在window 上 创 ...

  5. 在windows中创建.gitignore文件

    1.先任意创建一个文件,例如:1.txt 2.打开cmd命令行窗口,到1.txt目录下 windows7/8输入ren 1.txt .gitignore修改成功 windows10输入mv 1.txt ...

  6. 如何创建.gitignore文件,忽略不必要提交的文件

    1.gitignore 在工程实现过程中,会生成一些中间文件,或者在项目中的部分文件是不需要进行版本管理的.对于这些文件应该对于Github来讲是透明的.Github提供这种功能,可以自己指定哪些文件 ...

  7. git如何创建 .gitignore文件

    1.右键 点击git bash here 2.输入 touch .gitignore 生成 .gitignore文件 过滤 不上传 node_modules/

  8. 创建 .gitignore 文件过滤规

    文件 .gitignore 的格式规范如下: 所有空行或者以注释符号 # 开头的行都会被 Git 忽略. 可以使用标准的 glob 模式匹配. 匹配模式最后跟反斜杠(/)说明要忽略的是目录. 要忽略指 ...

  9. 如何创建.gitignore文件,忽略git不必要提交的文件

    touch .gitignore 在项目目录里输入以上名利后,会自动生成一个文件 .gitignore,可在文件里写入忽略的文件名,例如 node_modules coverage .idea npm ...

随机推荐

  1. js 浏览器页面切换事件

    document.addEventListener('visibilitychange', function() { console.log(isHidden() + "-" + ...

  2. Unity中的四个路径

    Application.database:当前工程的Assets文件夹(编辑器) Application.StreamingAssets:IO流路径 当前工程的StreamingAssets文件夹(编 ...

  3. javolution学习--介绍

    javolution提供一个高性的Java集合(collection )类库和一些实用的工具类.虽然这个类包只提供非常少的几个集合类,但是这些类就能够代替大部分java.util类.javolutio ...

  4. Ubuntu 16.04 LTS network DIASBLED解决办法

    问题 昨天正浏览着网页,突然无法连接.但右上角的wifi信号显示仍然是连接状态.于是我尝试断开再重新连接一次,没想到刚断开就报了个内部错误,然后wifi图标直接消失了.重启后虽然有wifi图标,但无法 ...

  5. sqlserver 事务嵌套

    参考 https://www.cnblogs.com/JentleWang/p/3654603.html https://blog.csdn.net/tuzhen007/article/details ...

  6. pandas中关于DataFrame 去除省略号

    #显示所有列 pd.set_option('display.max_columns', None) #显示所有行 pd.set_option('display.max_rows', None) #设置 ...

  7. Wasserstein距离

    https://blog.csdn.net/leviopku/article/details/81388306 https://blog.csdn.net/nockinonheavensdoor/ar ...

  8. LCS poj1080

    题目链接:https://vjudge.net/problem/POJ-1080 参考博客:https://yq.aliyun.com/ziliao/372259 题意:给两个字符串,只含有'A',' ...

  9. PAT1018 (dijkstra+dfs)

    There is a public bike service in Hangzhou City which provides great convenience to the tourists fro ...

  10. MAP使用方法集合

    一.整理: 看到array,就要想到角标. 看到link,就要想到first,last. 看到hash,就要想到hashCode,equals. 看到tree,就要想到两个接口.Comparable, ...