How can I use command (git archive --remote) using GitPython? As per the GitPython docs we can use git directly. I am doing something like:
git = repo.git git.archive(remote= 'http://path')
But getting an error "Exception is : Cmd('git') failed due to: exit code(1)"
Is there any sample that I can look at to execute git archive --remote in a python script?
Thanks
This question is quite old, but I came across the same problem, so here's my solution:
A few notes:
path
parameter to something meaningful in case you only want to include a subset of the directoryfetch()
call can probably be optimized. The**kwargs
taken by the functions may help here (seeman git-fetch
)