This is the error message I get:
fatal: destination path '.../atlassian-bitbucket-pipelines-runner/bin/../temp/{my_ID}/build' already exists and is not an empty directory.
I think this is because I accidentally pushed an executable onto my git repo, and that git clone copied this executable, so not my build contain this object, and make every following git clone failed.
I want to clean out BITBUCKET_BUILD_DIR but the problem is when I put
rm -rf "$BITBUCKET_BUILD_DIR"/* under script of a step, it will not be run because the build setup step for this step already failed because of the failed git clone.