FIND YOUR NEXT FEW LINES

Results for “Inspecting the working tree”

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

175 snippets foundClear filters
Docker / ComposeBuild images

Set a working directory

Choose the default directory for later instructions and the running process.

Dockerfile✓ Tested
GitCommit history & revision selection

List all files stored in a commit

Git: ls-tree inspects the committed tree without relying on working files.

Git✓ Tested
Bash ScriptsProcesses & environment

Change directory only for one operation

Bash Scripts: A subshell makes a temporary directory change without affecting later commands.

Bash Scripts✓ Tested
Linux CommandsFiles & permissions

Copy a directory while preserving attributes

Linux Commands: Use cp -a for a recursive local copy that preserves links and ordinary file attributes.

Linux Commands✓ Tested
GitWorking tree & staging

Ignore generated files

Exclude build output from untracked-file listings.

gitignore✓ Tested
GitWorking tree & staging

List changed files without the full diff

Inspect affected paths before staging.

diff✓ Tested
GitWorking tree & staging

Stage one file

Add one changed file to the next commit.

add✓ Tested
GitStashing selected work

Stash edits to one chosen file

Git: A pathspec limits the stash to selected paths while other changes remain in the working tree.

Git✓ Tested
GitBranches & recovery

Temporarily store tracked-file edits

Restore a clean working tree and then reapply your saved changes.

stash✓ Tested
GitWorking tree & staging

Unstage a file without losing edits

Return a staged change to the working tree.

restore✓ Tested
Bash ScriptsArray operations

Append several items to an array

Bash Scripts: Array-plus-equals adds elements without losing spaces inside a quoted item.

Bash Scripts✓ Tested
Bash ScriptsParameter expansion

Assign a default to an empty or unset variable

Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.

Bash Scripts✓ Tested