我正在尝试搭建React开发环境,其中一条指令是在终端中进入我的目录并输入以下代码:
touch .gitignore
当我创建一个带有名称和扩展名(例如
index.html
)的文件时,touch
命令可以正常工作,但由于这似乎只是一个扩展名,所以什么也没有发生。显然这是与上传到GitHub相关的重要文件 - 有人可以提供帮助吗?更新:我创建了
x.gitignore
,然后尝试删除x
,MacOS会弹出对话框提示:You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name.
ls -a
命令,你应该能看到它。它不是一个扩展名,而是一个隐藏文件。详见:https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory - azium