首页 > 解决方案 > VSCode 在 react-native 项目中忽略了我的 /android 文件夹

问题描述

我现在有一个弹出的 expo 应用程序,其中包括 ios 和 android 文件夹。

ios文件夹已上传到 GIT,但我/android将在 vscode 中被忽略并显示为灰色。

我的.gitignore只是包括以下几行:

node_modules/**/*
.expo/*
npm-debug.*

在此处输入图像描述

我看不到任何可以重现此行为的设置。:(

非常感谢您的任何建议!

标签: androidgitgithubvisual-studio-code

解决方案


好的,我找到了问题所在。全局 gitignore 配置错误。

解决问题的步骤。

  1. $ open ~/.gitconfig
  2. 在这里找到 .gitignore_global 的路径:

[核心] excludesfile = /Users//.gitignore_global

  1. $ open /Users/<username>/.gitignore_global

推荐阅读