diff --git a/.devcontainer/autoupdate.sh b/.devcontainer/autoupdate.sh index 4ef6ae2..7e13dd7 100644 --- a/.devcontainer/autoupdate.sh +++ b/.devcontainer/autoupdate.sh @@ -2,6 +2,7 @@ # Obtener y fusionar cambios del repositorio upstream GIT="git --git-dir=$PWD/.git --work-tree=$PWD" + $GIT fetch origin $GIT rebase origin $GIT fetch upstream diff --git a/.devcontainer/configuregit.sh b/.devcontainer/configuregit.sh index 17b0deb..b35718f 100644 --- a/.devcontainer/configuregit.sh +++ b/.devcontainer/configuregit.sh @@ -4,5 +4,6 @@ SAFE_DIRECTORY="/workspaces/codespaces-uni" REPO="https://github.com/DeybisMelendez/codespaces-uni.git" -git config --global --add safe.directory "$SAFE_DIRECTORY" -git remote add upstream $REPO \ No newline at end of file +GIT="git --git-dir=$PWD/.git --work-tree=$PWD" +$GIT config --global --add safe.directory "$SAFE_DIRECTORY" +$GIT remote add upstream $REPO \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4d1559f..32c358b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -42,5 +42,5 @@ "files.autoSaveDelay": 3000, "files.autoSaveWhenNoErrors": true }, - "postStartCommand": "sh .devcontainer/configuregit.sh && sh .devcontainer/autoupdate.sh" + "postAttachCommand": "sh .devcontainer/configuregit.sh && sh .devcontainer/autoupdate.sh" } \ No newline at end of file