如何使用来创建文件。 Windows资源管理器中的点前缀

If you right click in Windows and try to make a new text file with a . period/dot in front of it:

如果在Windows中单击鼠标右键,然后尝试使用创建一个新的文本文件。 前面的句点/点:

image

Name the file...something like .gitignore, for example.

命名文件...例如,类似.gitignore的文件。

image

You'll get the "You must type a file name" error.

您将收到“您必须输入文件名”错误。

image

But, rather than typing .gitignore, if you include an ending dot also, like

但是,如果您还包括一个结束点,则不要键入.gitignore,例如

.gitignore.

.gitignore。

Then it works fine.

然后工作正常。

image

Thanks, Mads, for the tip!

谢谢, Mads ,给小费!

NOTE: We're assuming that you have "File name extensions" turned on, because if you don't, you're likely not a programmer. ;)

注意:我们假设您已打开“文件扩展名”,因为如果没有,则可能不是程序员。 ;)

image

UPDATED: Mads has created an "Add Empty File" Extension for VS that makes it easy to create . files as well!

更新: Mads为VS创建了一个“添加空文件”扩展名,使创建起来很容易。 文件也一样!

翻译自: https://www.hanselman.com/blog/how-to-create-a-file-with-a-dot-prefix-in-windows-explorer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值