S
S
skynger2022-03-29 16:21:55
Python
skynger, 2022-03-29 16:21:55

How to upload files from computer to GitHub without fail using Python?

I need to upload a file from my computer to GitHub using Python, but I don't know how. This must be done with Python! help me please)))!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexbprofit, 2022-03-29
@alexbprofit

import subprocess

subprocess.check_call(['git', 'add', 'file_name'])
subprocess.check_call(['git', 'commit', '-m', 'your_commit'])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question