GitPython is a way of interacting with git from python. I'm trying to access the basic git commands (e.g. git commit -m "message"
) from this module, which according to this should be accessed through the Git module. Here's what I've tried so far to get these commands working:
>>> import git
>>> foo = git.Git("~/git/GitPython")
>>> bar = "git commit -m 'message'"
>>> beef = git.Git.execute(foo,bar)
This shows up an error saying that there is no such file or directory. I've also tried the following as paths to my git directory:
~/git/GitPython/.git
/Users/bacon/git/gitclient/
The only other option is that the command is wrong, so I tried:
commit -m "message"
as well, and still get "no such file or directory".
What do I need to do to get these git commands working properly?