I was wondering how to clone/download a github file or files via a python script. I cant seem to figure out how to
Asked
Active
Viewed 220 times
1 Answers
0
In addition to Maurice Meyer's method, you can do as follows:
In order to clone an entire git repository, you would use the following command line script:
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
Taking that into account, you could have a python script which would execute this command, by using the subprocess library, such as:
import subprocess
subprocess.run(["git", "clone", "https://github.com/YOUR-USERNAME/YOUR-REPOSITORY"])

Atalajaka
- 125
- 1
- 2
- 14