git clone or pull if exists code example Example: git pull if exist and clone if cd repo; then git pull; else git clone https://server/repo repo; fi