FIND YOUR NEXT FEW LINES

Results for “local”

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

377 snippets foundClear filters
GitRestoring & revising local work

Create a recovery branch for a recently moved commit

Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.

Git✓ 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
Bash ScriptsFunctions & arguments

Give a function an optional argument

Let callers omit a value while keeping nounset enabled.

optional argument✓ Tested
GitTags & repository configuration

Ignore a personal scratch file without changing shared rules

Git: The repository-local exclude file applies only to this checkout.

Git✓ Tested
JavaScriptText handling & Unicode

Normalize identifier case consistently

JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Normalize identifier case consistently

TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

TypeScript✓ Tested
GitRestoring & revising local work

Preview removal of an untracked scratch file

Git: The dry-run flag shows what clean would remove without deleting it.

Git✓ Tested
GoFiles & paths

Reject an escaping relative path

Reject an escaping relative path using a complete Go program with explicit sample inputs.

Go✓ Tested
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested
GitTags & repository configuration

Set an author identity only for this repository

Git: Local configuration avoids changing the identity used by unrelated repositories.

Git✓ Tested
GitMerging & replaying changes

Abort a conflicting cherry-pick

Git: Abort removes the incomplete replay and returns to the previous branch state.

Git✓ Tested