I have to clone a set of projects from one repository and push it then to a remote repository automatically. Therefore i'm using python and the specific module GitPython. Until now i can clone the project with gitpython like this:
def main():
Repo.clone_from(cloneUrl, localRepoPath)
# Missing: Push the cloned repo to a remote repo.
How can i use GitPython to push the cloned repo to a remote repo?
subprocess.check_call(['git', 'remote', 'set-url', 'remote', url]
. You can leave out theurl=
, no kw arg needed. – Vaulting