Git忽略了Windows 10下的gitignore文件 [英] Git is ignoring gitignore file under Windows 10

查看:118
本文介绍了Git忽略了Windows 10下的gitignore文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Git忽略了.gitignore文件中的文件夹. 这是我的.gitignore:(env是venv在Python中生成的文件夹)

Git is ignoring the folders in .gitignore file. Here is my .gitignore : (env is a folder generated by venv in Python )

#folders
env/**
pdfs/**


# files

#source files
/timeformat.py
/pdfreader.py

我已经做过:git rm -r --cached .然后是git add .,但是它会将所有文件添加到env/Lib/site-packages
下 有什么问题吗?

I already did : git rm -r --cached . then git add . but it's adding all the files under env/Lib/site-packages
What is the problem ?

这是我的目录结构:

推荐答案

将env/**更改为env/* 它为我做了工作

change env/** to env /* It did the job for me

这篇关于Git忽略了Windows 10下的gitignore文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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