We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d63a102 commit b2e2c48Copy full SHA for b2e2c48
entrypoint.sh
@@ -149,7 +149,11 @@ git config --global --add safe.directory "$CLONE_DIR"
149
if [ "$CREATE_TARGET_BRANCH_IF_NEEDED" = "true" ]
150
then
151
echo "[+] Switch to the TARGET_BRANCH"
152
- git switch -c "$TARGET_BRANCH"
+ # || true: if the $TARGET_BRANCH already existed in the destination repo:
153
+ # it is already the current branch and it cannot be switched to
154
+ # (it's not needed)
155
+ # If the branch did not exist: it switches (creating) the branch
156
+ git switch -c "$TARGET_BRANCH" || true
157
fi
158
159
echo "[+] Adding git commit"
0 commit comments