I am trying to be Pythonic. Thus, I have this code:
import git
import uuid
repo = git.Repo(...)
u = repo.create_remote(uuid.uuid4(), 'https://github.com/...')
If I wasn't trying to be pythonic, I could do this:
repo.git.push(u.name, refspec, '--force-with-lease')
...but I am trying to be Pythonic. How do I do a --force-with-lease
push using this (git.remote.Remote
) object?
u.push(refspec, help=needed)
It looks like I can say:
u.push(refspec, force=True)
...but I don't think that uses a lease?