Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
12 lines (8 loc) · 475 Bytes

File metadata and controls

12 lines (8 loc) · 475 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
# https://www.steadylearner.com/blog/read/How-to-automatically-commit-files-to-GitHub-with-Python
import subprocess as cmd
target = "git@github.com:steadylearner/ethdev-diary.git"
cmd.run("rm -rf .git && git init && git add .", check=True, shell=True)
message = "Reset commits"
cmd.run(f"git commit -m '{message}'", check=True, shell=True)
cmd.run(f"git remote add origin {target}", check=True, shell=True)
cmd.run("git push -u origin master -f", check=True, shell=True)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.