Results for “changes”
Small, practical examples. Search by task or narrow things down below.
Isolate variable changes in a subshell
Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.
Bash Scripts✓ Tested
Prevent runtime changes to top-level properties
JavaScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.
JavaScript✓ Tested
Prevent runtime changes to top-level properties
TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.
TypeScript✓ Tested
Read values until a condition changes
Read values until a condition changes in a complete Rust program using the standard library.
Rust✓ Tested
Render signal changes with OnPush
Render signal changes with OnPush with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Rerun an effect when its dependency changes
Rerun an effect when its dependency changes with a small React component and explicit browser behavior.
React✓ Tested
Respond when a select value changes
jQuery: Learn how to respond when a select value changes in a complete browser example.
jQuery✓ Tested
Stash only the staged changes
Git: The staged option saves index changes while keeping unrelated unstaged edits.
Git✓ Tested
Abort a conflicting cherry-pick
Git: Abort removes the incomplete replay and returns to the previous branch state.
Git✓ Tested
Abort a conflicting rebase
Git: Abort returns the branch to its state before the rebase attempt.
Git✓ Tested
Abort a merge with unresolved conflicts
Git: Abort restores the pre-merge state in this clean practice repository.
Git✓ Tested
Apply one commit from another branch
Git: Cherry-pick replays the selected change as a commit on the current branch.
Git✓ Tested