I am working on a python script that takes a repository name from a properties file and it either it does
git remote add -f origin repository_name
or if it finds a .git folder already there, it just fetches a branch.
My problem is, the above command takes lot of time .So I will want to find that the repository name that is coming from properties file is same as represented by .git folder(or we can say someone already ran above command). If it is same then go ahead and just checkout a branch else run the above command.
I will want to put a check that if the repository that's coming from properties is same as represented by .git folder.