Results for “Restoring & revising local work”
Small, practical examples. Search by task or narrow things down below.
Rename a container without recreating it
Docker / Compose: rename updates the container name while preserving its identity.
Docker / Compose✓ Tested
Rename the current branch
Git: branch -m changes the local branch name without creating a new commit.
Git✓ Tested
Repeat a command for several words
Bash Scripts: Repeat a command for several words with a small standalone Bash program.
Bash Scripts✓ Tested
Repeat a task with a counted loop
Repeat a task with a counted loop using a complete Go program with explicit sample inputs.
Go✓ Tested
Repeat an action a fixed number of times
Use a counter and delay for a simple finite sequence.
for loop✓ Tested
Repeat until a condition becomes true
Bash Scripts: An until loop continues while its test returns a nonzero status.
Bash Scripts✓ Tested
Repeat while a condition holds
Repeat while a condition holds in a complete Rust program using the standard library.
Rust✓ Tested
Replace a literal substring
Replace a literal substring in a complete Rust program using the standard library.
Rust✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested
Replace a value and keep the old value
Replace a value and keep the old value in a complete Rust program using the standard library.
Rust✓ Tested
Replace an element while preserving its position
jQuery: replaceWith swaps an entire node.
jQuery✓ Tested
Replace every occurrence in a string
Substitute text directly with Bash parameter expansion.
replace✓ Tested