I have the same problem. I don't know how to overwrite.. But I have an alternative: before checkout the new project --> delete the old project. I am using this code:
myfile = (ProjectPath+"/"+your.project)
print("Your.project is not available")
And now checkout...
I hope thats a good help until a moderator help us.
Thanks Chris, that worked fine.
I hoped, that I didn't have to use such a solution. But temporary it's OK.
Perhaps a moderator might help us with another solution?