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