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. pandas 读取大文件 read_table C-engine CParserError: Error tokenizing data

    解决办法: pd_data = pd.read_table(comment_file,header=None,encoding='utf-8', engine='python') 官网解析: engi ...

  2. Spring AOP @Aspect

    spring提供了两个核心功能,一个是IoC(控制反转),另外一个便是Aop(面向切面编程),IoC有助于应用对象之间的解耦,AOP则可以实现横切关注点(如日志.安全.缓存和事务管理)与他们所影响的对 ...

  3. jvm参考网页

    --------------------------------------------- https://www.e-learn.cn/content/wangluowenzhang/37475 h ...

  4. love is ... ...

    16 years old, love is dream.20 years old, love is sex.30 years old, love is marriage. 40 years old, ...

  5. python 取当前日期

    import time time.strftime('%Y-%m-%d',time.localtime(time.time()))

  6. 学习Auxre记录

    1.下载地址:https://www.axure.com.cn/3510/(可以免费试用30天) 2.视频教程:https://huke88.com/course/6455.html 3.文字教程:h ...

  7. Codeforces Beta Round #74 (Div. 2 Only)

    Codeforces Beta Round #74 (Div. 2 Only) http://codeforces.com/contest/90 A #include<iostream> ...

  8. vue 引用公共方法(例子:截取字符串固定字数,其余显示...)

    1.写公共js 2.main.js引入公共js 3.在组件中用this.common.方法名 引用

  9. AngularJS——第3章 指令

    第3章 指令 所谓指令就是AngularJS自定义的HTML属性或标签,这些指令都是以ng-做为前缀的,例如ng-app.ng-controller.ng-repeat等. 3.1 内置指令 ng-a ...

  10. 24-算法训练 删除数组零元素-- list的使用

    http://lx.lanqiao.cn/problem.page?gpid=T201 算法训练 删除数组零元素   时间限制:1.0s   内存限制:512.0MB      从键盘读入n个整数放入 ...