FIND YOUR NEXT FEW LINES

Results for “working tree”

Small, practical examples. Search by task or narrow things down below.

174 snippets foundClear filters
Bash ScriptsParameter expansion

Convert a variable to uppercase

Bash Scripts: Double caret transforms matching lowercase characters in Bash 4 or later.

Bash Scripts✓ Tested
Bash ScriptsArray operations

Copy an array independently

Bash Scripts: A new array assignment copies element values rather than creating a shared reference.

Bash Scripts✓ Tested
GitRestoring & revising local work

Correct the latest unpublished commit message

Git: Amend replaces the current commit while preserving its tree when no new changes are staged.

Git✓ Tested
Bash ScriptsGetting Started

Count array elements

Bash Scripts: Count array elements with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Count down with a while loop

Bash Scripts: Count down with a while loop with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsArray operations

Count the elements in an array

Bash Scripts: The array length form counts assigned elements, not characters in the first value.

Bash Scripts✓ Tested
C#Files & paths

Create nested directories

Create a directory tree using the .NET Directory API.

C#✓ Tested
C++Files & paths

Create nested directories

Use C++17 filesystem to create a directory tree.

C++✓ Tested
Bash ScriptsGetting Started

Declare a fixed configuration value

Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Define and call a shell function

Bash Scripts: Define and call a shell function with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsFiles & reliability

Detect an error inside a pipeline

Use pipefail to observe failure before the last pipeline command.

pipefail✓ Tested
GitRestoring & revising local work

Discard an unstaged edit to one tracked file

Git: Restore copies the index version back into the selected working file.

Git✓ Tested