Próbuję znaleźć sposób, aby pobrać repozytorium git za pomocą gitPython. Do tej pory to jest to, co wziąłem z oficjalnych dokumentów here.Jak mogę pobrać zdalne repozytorium za pomocą GitPython?
test_remote = repo.create_remote('test', '[email protected]:repo.git')
repo.delete_remote(test_remote) # create and delete remotes
origin = repo.remotes.origin # get default remote by name
origin.refs # local remote references
o = origin.rename('new_origin') # rename remotes
o.fetch() # fetch, pull and push from and to the remote
o.pull()
o.push()
Faktem jest, że chcę, aby uzyskać dostęp do repo.remotes.origin zrobić pull withouth zmiana nazwy to pochodzenie (origin.rename) W jaki sposób można to osiągnąć? Dzięki.
Nazwa 'repo_name' nie jest w rzeczywistości nazwą repozytorium, ale ścieżką do systemu plików do bazy repozytorium git. –