Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload only source files to github?

Tags:

git

python

github

I have project written in python which i would like to upload to my github repo. In my source directory in laptop, there are other compiled python scripts (.pyc) residing as well which i would like to avoid uploading to github. The documentation avaiable on the internet shows uploading entire source directory to github repo.

Is there a way to avoid uploading certain file type, specifically *.pyc, to github repo?

like image 232
sundar_ima Avatar asked Aug 04 '26 11:08

sundar_ima


1 Answers

Make a .gitignore file and add *.pyc to it

I recommend you put this standard .gitignore for python by github It has *.py[cod] to get rid of .pyc,.pyo and .pyd files

like image 89
K DawG Avatar answered Aug 07 '26 00:08

K DawG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!