Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tips] Git 忽略目录里的文件但不忽略目录的办法 | 自留地 #2

Open
nsdont opened this issue Sep 24, 2019 · 0 comments

Comments

@nsdont
Copy link
Owner

nsdont commented Sep 24, 2019

https://nsdont.tech/2016/05/06/Tips-Git-%E5%BF%BD%E7%95%A5%E7%9B%AE%E5%BD%95%E9%87%8C%E7%9A%84%E6%96%87%E4%BB%B6%E4%BD%86%E4%B8%8D%E5%BF%BD%E7%95%A5%E7%9B%AE%E5%BD%95%E7%9A%84%E5%8A%9E%E6%B3%95/

背景我在开发时候遇到一个问题,关于图片上传接口, 默认情况下,Python 代码是不会自动创建文件的,如果想要把图片保存到某个目录下面,需要事先检查是否有这个目录结构,否则就会报错。但是纠结的那颗心,我😭拒绝写检查文件夹是否存在的代码。 所以有了这篇文章。 正文长话短说,我发现了简单两个方法来达到我的目的。 方法一:巧妙的修改配置文件gitignore 的用法可以看下面的链接,放出我的 giti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant