Git不会“看到"ASP.NET MVC4 Web应用程序中的App_Data [英] Git doesn't "see" App_Data in ASP.NET MVC4 web application

查看:43
本文介绍了Git不会“看到"ASP.NET MVC4 Web应用程序中的App_Data的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在想是否在

回购的问题我手动创建的这是我的结果(来自bash提示符):

This is a new application that I just created and immediately initialized a repo. I tried creating another new application (from Visual Studio 2012), and got the same result. I also tried simply initializing a git repo in a directory that I manually created. Here are my results (from bash prompt):

我正在Windows 7操作系统上运行git版本为1.8.1.2的msysgit.

$ mkdir TEST

$ cd TEST

$ mkdir App_Data

$ ls
App_Data/

$ git init
Initialized empty Git repository in c:/Projects/TEST/.git/

$ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)

$ echo wtf...

为什么的问题,而忽略了 App_Data 目录?

Why is git ignoring the App_Data directory?

推荐答案

Git忽略了App_Data目录,因为它为空.Git基于文件而不是文件夹工作,因此忽略空目录.存储空目录的一种标准方法是将 .gitignore readme 文件放在文件夹中并提交.

Git is ignoring the App_Data directory because it is empty. Git works based on files rather than folders so ignores empty directories. A standard way to store an empty directory is to place a .gitignore or readme file in the folder and commit that.

这篇关于Git不会“看到"ASP.NET MVC4 Web应用程序中的App_Data的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆