We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66655bc commit 7a956daCopy full SHA for 7a956da
src/devcontainers/base/src/.devcontainer/nhsnotify/postcreatecommand.sh
@@ -31,6 +31,9 @@ echo "created destination directory $DEST"
31
echo "Cloning repository from $REPO to $DEST"
32
git clone $REPO $DEST
33
echo "cloned repository $REPO to $DEST"
34
+
35
+CURRENT_BRANCH=$(git symbolic-ref --short HEAD)
36
+echo "current branch is $CURRENT_BRANCH"
37
git switch -C $UPDATE_BRANCH
38
39
\cp -rf $DEST/scripts ./scripts
@@ -40,7 +43,7 @@ git switch -C $UPDATE_BRANCH
40
43
git add .
41
44
git commit -m "Update default files from $REPO" || echo "No changes to commit"
42
45
-git switch -
46
+git switch $CURRENT_BRANCH
47
git merge $UPDATE_BRANCH -m "Merge default files from $REPO"
48
echo "$REPO template complete"
49
0 commit comments