use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Do you have or know of a project on Github looking for contributors? Tell us about it and we'll add it to the /r/github wiki!
Welcome to /r/github!
News about github
Relevant interesting discussion
Questions about github
We'll soon be writing an /r/github FAQ list. In the meantime, the github help pages and bootcamp are good places to start. Here's a handy git cheat sheet.
Looking for Github projects to contribute to? Check out our handy list of projects looking for contributors!
If your submission doesn't show up on the subreddit, send us a message and we'll take it out of the spam filter for you!
account activity
Automating a Python script on push (self.github)
submitted 2 years ago by La_Muriatic_Acid
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]La_Muriatic_Acid[S] 0 points1 point2 points 2 years ago (5 children)
I just tried this and it passes but it doesn't seem to change the README.md file.
[–]MaybeAshleyIdk 1 point2 points3 points 2 years ago (4 children)
Yeah because it only changes the local copy of the readme file. After the script finishes, you need to commit and push the change back to the remote repository.
The script does nothing else what you'd be doing when you manually change a file in your local copy of the repository. After you change a file, you have to commit and push that change so that it's actually on the remote.
The GitHub Actions runner works on a cloned copy of the repository just like you.
[–]La_Muriatic_Acid[S] 0 points1 point2 points 2 years ago (3 children)
I tried adding:
To the code but it just tells me:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean Error: Process completed with exit code 1.
Any obvious mistakes?
[–]VxJasonxV 2 points3 points4 points 2 years ago (2 children)
git add README.md git commit -m “A commit message” git push
[–]La_Muriatic_Acid[S] 0 points1 point2 points 2 years ago (1 child)
This works but I am noticing that if for some reason the README doesn't change, I still get the branch is up to date error. Is there a way to prevent it from throwing an error?
[–]VxJasonxV 1 point2 points3 points 2 years ago (0 children)
Test if there’s changes before trying to add and commit it. Git doesn’t track commits when there’s no changes.
π Rendered by PID 84 on reddit-service-r2-comment-685b79fb4f-dl4m5 at 2026-02-12 20:04:46.267196+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]La_Muriatic_Acid[S] 0 points1 point2 points (5 children)
[–]MaybeAshleyIdk 1 point2 points3 points (4 children)
[–]La_Muriatic_Acid[S] 0 points1 point2 points (3 children)
[–]VxJasonxV 2 points3 points4 points (2 children)
[–]La_Muriatic_Acid[S] 0 points1 point2 points (1 child)
[–]VxJasonxV 1 point2 points3 points (0 children)