简体   繁体   English

Git 文件在 windows powershell 中创建后不显示

[英]Git file doesn't show up after being created in the windows powershell

I created a git folder in the windows power shell using the code: git init, but I can't see the folder where I created it. I created a git folder in the windows power shell using the code: git init, but I can't see the folder where I created it. If git folders are hidden then how can I access them and make them visible because I want them to show up in Visual Studio Code?如果 git 文件夹被隐藏,那么我如何访问它们并使它们可见,因为我希望它们显示在 Visual Studio Code 中?

You need to make hidden folder visible.您需要使隐藏文件夹可见。

In windows:在 windows 中:

  1. Open File Explorer from the taskbar.从任务栏中打开文件资源管理器。
  2. Select View > Options > Change folder and search options. Select 视图 > 选项 > 更改文件夹和搜索选项。
  3. Select the View tab and, in Advanced settings, select Show hidden files, folders, and drives and OK. Select 查看选项卡,在高级设置中,select 显示隐藏文件、文件夹和驱动器,然后确定。

View hidden files and folders Windows 10 查看隐藏文件和文件夹 Windows 10

In Visual Studio Code.在 Visual Studio 代码中。

  1. Menu Code → Preference → Setting菜单代码 → 偏好 → 设置
  2. Search for files.exclude搜索文件。排除
  3. Mouse over files.exclude property, click on the edit icon and then opt for the copy to settings.将鼠标悬停在 files.exclude 属性上,单击编辑图标,然后选择复制到设置。
  4. The above steps will add all the properties, but keep only those which need to be overridden.上述步骤将添加所有属性,但仅保留需要覆盖的属性。 For this case: it should be, "files.exclude": { "**/.git": false }对于这种情况:应该是"files.exclude": { "**/.git": false }
  5. Close the user setting.关闭用户设置。 the.git folder will automatically appear in the respective repository. .git 文件夹将自动出现在相应的存储库中。

Visual Studio Code: .git folder/file hidden Visual Studio 代码:.git 文件夹/文件隐藏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM