Added checks for repo status before pushing