I am working on a data analysis project whose directory structure looks like following
pipeline1.py
pipeline2.py
...
pipelineN.py
data/
config/
test/
where folder data/
mixes a lot of data processing Python scripts and raw data.
Now I am almost done with the data preprocessing in data/
and ready to commit changes to my personal GitHub repo. However, I am not sure how could I push only .py
in this folder.
I have tried adding following to .gitignore
but this will ignore the data/
entirely and hence not desirable.
!*.py
data/
You should use that way:
data/
.data/*.py
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.