FIND YOUR NEXT FEW LINES

Results for “keep original”

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

169 snippets foundClear filters
jQueryForm serialization & state

Restore a form’s original default values

jQuery: Call the native reset method through the underlying form element.

jQuery✓ Tested
GitGetting Started

Return to the original branch

Git: Return to the original branch inside the disposable repository created by the input setup.

Git✓ Tested
JavaScriptArray restructuring

Reverse a copy while preserving the original

JavaScript: Copy before reverse because reverse mutates the array it receives.

JavaScript✓ Tested
TypeScriptArray restructuring

Reverse a copy while preserving the original

TypeScript: Copy before reverse because reverse mutates the array it receives.

TypeScript✓ Tested
ReactLists & filtering

Sort a copy without mutating the original list

Sort a copy without mutating the original list with a small React component and explicit browser behavior.

React✓ Tested
HTMLNative disclosure & dialogs

Start a disclosure open while keeping it collapsible

HTML: The open attribute sets the initial details state without JavaScript.

HTML✓ Tested
GitRestoring & revising local work

Stop tracking a generated file while keeping it locally

Git: Removing a path from the index leaves its working copy intact when cached is specified.

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
GitGetting Started

Unstage a file while keeping its contents

Git: Unstage a file while keeping its contents inside the disposable repository created by the input setup.

Git✓ Tested
GitStashing selected work

Stash unstaged work while leaving staged edits available

Git: Keep-index preserves the staged state for testing or committing while stashing the rest.

Git✓ Tested
GitWorking tree & staging

Unstage a file without losing edits

Return a staged change to the working tree.

restore✓ Tested
SQLGetting Started

Accept either of two conditions

SQL: Use OR to keep matching names or out-of-stock rows.

SQL✓ Tested