FIND YOUR NEXT FEW LINES

Results for “start of month”

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

858 snippets foundClear filters
GitInspecting the working tree

Summarize added and removed lines numerically

Git: Numstat provides tab-separated counts suitable for processing.

Git✓ Tested
Docker / ComposeCompose service options

Supply a default for an unset Compose variable

Docker / Compose: The default interpolation form supplies a value when the variable is absent or empty.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Supply a non-secret configuration file

Docker / Compose: A Compose config mounts a declared file into the service.

Docker / Compose✓ Tested
Docker / ComposeExecution & file transfer

Supply an environment variable to an exec process

Docker / Compose: An exec environment override applies to the new process only.

Docker / Compose✓ Tested
GitBranches & recovery

Temporarily store tracked-file edits

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

stash✓ Tested
GitBranches & ancestry

Test whether one revision is an ancestor of another

Git: merge-base --is-ancestor reports its answer through the exit status.

Git✓ Tested
GitInspecting the working tree

Test whether tracked working files changed

Git: A quiet diff returns status one for differences, so handle it in a conditional.

Git✓ Tested
GitRestoring & revising local work

Uncommit a local change and leave its edits unstaged

Git: A mixed reset resets the index while retaining working-file contents.

Git✓ Tested
GitRestoring & revising local work

Uncommit the latest local change while keeping it staged

Git: A soft reset moves the branch tip but preserves both index and working files.

Git✓ Tested
GitBranches & recovery

Undo a commit with a new commit

Reverse a change while preserving shared history.

revert✓ Tested
GitWorking tree & staging

Unstage a file without losing edits

Return a staged change to the working tree.

restore✓ Tested
Docker / ComposeDockerfile patterns

Use a build argument while creating an image

Docker / Compose: ARG supplies a build-time value that is not automatically a runtime environment variable.

Docker / Compose✓ Tested