FIND YOUR NEXT FEW LINES

Results for “Files & permissions”

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

380 snippets foundClear filters
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
Docker / ComposeGetting Started

Define a first Compose service

Docker / Compose: Define a first Compose service in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeCompose applications

Define a one-off Compose service

Describe an image and command in a reusable YAML file.

Compose✓ Tested
GitRemotes & additional checkouts

Delete a chosen branch from a practice remote

Git: The delete push removes only the explicitly named remote branch.

Git✓ Tested
GitBranches & ancestry

Delete an already merged practice branch

Git: The lowercase -d option refuses to delete an unmerged branch in ordinary use.

Git✓ Tested
GitTags & repository configuration

Delete only a selected local tag

Git: Deleting a local tag does not delete a corresponding remote tag.

Git✓ Tested
Bash ScriptsFiles & reliability

Detect an error inside a pipeline

Use pipefail to observe failure before the last pipeline command.

pipefail✓ Tested
Docker / ComposeCompose service options

Disable a service’s network interfaces

Docker / Compose: network_mode none leaves only the loopback interface.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Disable networking for a Compose command

Docker / Compose: Disable networking for a Compose command in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Disable networking for a local command

Docker / Compose: Disable networking for a local command using a locally available Ubuntu image.

Docker / Compose✓ 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
GitRemotes & additional checkouts

Distinguish a bare repository from a working checkout

Git: rev-parse reports repository mode without relying on directory naming conventions.

Git✓ Tested