#!/bin/bash TARGET="path to work repo" GIT_DIR="Path to .git repo" BRANCH="master" git --work-tree="$TARGET" --git-dir="$GIT_DIR" checkout -f "$BRANCH" cd $TARGET #docker-compose block: # 1 docker-compose build # 2 docker-compose down # 3 docker-compose up -d