Reputation: 1497
Can any one tell me how I can pull data from remote repository (custom branch) with Python? Im currently using GitPython...
Upvotes: 1
Views: 1408
Reputation: 336
You can use the python dulwich package.
Check out this question for some direction: Programmatically `git checkout .` with dulwich
Upvotes: 2
Reputation: 375445
repo = Repo.clone_from("path/of/repo/to/pull", "path/of/clone")
This function is described more precisely in the docs.
.
In order to pull the latest, you should use the pull GitPython command:
repo.pull()
by default this should use the paths specified on instantiation as <src>:<dst>
.
Upvotes: 1