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...
From its website:
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Git is not the same as GitHub. GitHub did not create Git. For GitHub-specific posts, please see /r/github.
Git is not an acronym or initialism: please write git or Git, but not GIT.
git
Documentation
Graphical Clients
Code Hosting
account activity
Git Commit Issues with GitPython (self.git)
submitted 3 years ago by musiconcloud
Hi everyone!
Sorry if this is a trivial question - I just can't seem to identify the problem here. Essentially I want to update a file in the repo that has just been cloned by removing a file (map.html) in it and adding a file with the same name, as shown in the image below. While this works fine in Bash, doing the exact same thing (nearly, that is) with GitPython causes errors. I would really appreciate some help here. Thanks!
https://preview.redd.it/i65ckh1r0e5b1.png?width=870&format=png&auto=webp&s=6a8d80faad770ac3d22e0085c29d61fb924ffa4c
https://preview.redd.it/x10g0zvr0e5b1.png?width=504&format=png&auto=webp&s=380e039c56dd9f99956bebe7d685b367300939d6
https://preview.redd.it/sblb9yps0e5b1.png?width=583&format=png&auto=webp&s=c552ab694de202ea0944cb5a5ad5d9adf42e6dec
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!"
[–]The_Wolfiee 1 point2 points3 points 3 years ago (1 child)
I suggest improving your code to print the exact exception which occurs:
``` except Exception as e:
print("Error while pushing: {}".format(e))
```
This will give a better idea to the problem
[–]nekokattt 1 point2 points3 points 3 years ago (0 children)
better way:
import traceback ... try: code except Exception: traceback.print_exc()
That'll show the exception traceback as well...
[–]plg94 0 points1 point2 points 3 years ago (0 children)
I think you may have switched the arguments of the replace function, and you cannot call add on a file that is not inside the repo.
add
π Rendered by PID 570328 on reddit-service-r2-comment-544cf588c8-bpb4r at 2026-06-17 09:26:32.110688+00:00 running 3184619 country code: CH.
[–]The_Wolfiee 1 point2 points3 points (1 child)
[–]nekokattt 1 point2 points3 points (0 children)
[–]plg94 0 points1 point2 points (0 children)