Results for “Set-Content”
Small, practical examples. Search by task or narrow things down below.
Create a file only when it does not exist
C#: FileMode.CreateNew prevents accidental replacement of existing content.
C#✓ Tested
Create a first practice commit from staged changes
Git: Create a first practice commit from staged changes inside the disposable repository created by the input setup.
Git✓ Tested
Create a lightweight tag at the current commit
Git: A lightweight tag is a direct reference without an annotation object.
Git✓ Tested
Create a native disclosure
Use details and summary to show optional HTML content without JavaScript.
HTML✓ Tested
Create a network marked for internal connectivity
Docker / Compose: The internal option disables normal external routing for that network.
Docker / Compose✓ Tested
Create a recovery branch for a recently moved commit
Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.
Git✓ Tested
Create a runtime file during the build
Docker / Compose: RUN executes during the build while CMD executes when a container starts.
Docker / Compose✓ Tested
Create a small file at build time
Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Create an annotated release tag
Mark a revision with a readable release description.
tag✓ Tested
Create an empty file
Linux Commands: Use touch to create a file when absent; an existing file keeps its contents but gets updated timestamps.
Linux Commands✓ Tested
Create and switch to a branch
Start an isolated feature branch from the current commit.
switch✓ Tested
Declare a named volume in Compose
Mount persistent storage at a service path.
Compose✓ Tested