I have written code to clone the repository using Python Flask.
from flask import Flask, render_template
app=Flask(__name__)
from git.repo.base import Repo
@app.route('/')
def index():
#here i have to write the code to check if the "FolderToSave" already exists! If it doesn't then only clone
Repo.clone_from("https://github.com/***", "FoldertToSave")
return render_template("index.html")
if __name__=='__main__':
app.run(debug=True)
Is there any method in git to check clone has already present in the local repository??