1
0
mirror of synced 2025-12-21 10:57:10 -05:00

[Nov. 11, 2021] New article about codespaces lifecycle (#22385)

* Add new article to index

* Add new article to landing page

* Link to new article

* Add new article

* Update lifecycle article

* Rearrange index

* Add reviewer feedback

* Add reviewer feedback

* Update code sample

* Update code sample

* Apply suggestions from code review

Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>

* Update content/codespaces/developing-in-codespaces/codespaces-lifecycle.md

Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Amy Burns <timeyoutakeit@github.com>

* Apply suggestions from code review

Co-authored-by: Allison Weins <3174849+2percentsilk@users.noreply.github.com>

* Update content/codespaces/developing-in-codespaces/codespaces-lifecycle.md

Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
Co-authored-by: Amy Burns <timeyoutakeit@github.com>
Co-authored-by: Allison Weins <3174849+2percentsilk@users.noreply.github.com>
This commit is contained in:
Ethan Palm
2021-11-10 15:36:12 -08:00
committed by GitHub
parent 2a79e8094b
commit 651d8c83d2
6 changed files with 90 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ When you create a codespace, a number of steps happen to create and connect you
For more information on what happens when you create a codespace, see "[Deep Dive](/codespaces/getting-started/deep-dive)."
For more information on the lifecycle of a codespace, see "[Codespaces lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)."
If you want to use Git hooks for your codespace, then you should set up hooks using the [`devcontainer.json` lifecycle scripts](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts), such as `postCreateCommand`, during step 4. Since your codespace container is created after the repository is cloned, any [git template directory](https://git-scm.com/docs/git-init#_template_directory) configured in the container image will not apply to your codespace. Hooks must instead be installed after the codespace is created. For more information on using `postCreateCommand`, see the [`devcontainer.json` reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties) in the Visual Studio Code documentation.
{% data reusables.codespaces.use-visual-studio-features %}