Results for “local”
Small, practical examples. Search by task or narrow things down below.
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
Discard an unstaged edit to one tracked file
Git: Restore copies the index version back into the selected working file.
Git✓ Tested
Give a function an optional argument
Let callers omit a value while keeping nounset enabled.
optional argument✓ Tested
Ignore a personal scratch file without changing shared rules
Git: The repository-local exclude file applies only to this checkout.
Git✓ Tested
Normalize identifier case consistently
JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
JavaScript✓ Tested
Normalize identifier case consistently
TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
TypeScript✓ Tested
Preview removal of an untracked scratch file
Git: The dry-run flag shows what clean would remove without deleting it.
Git✓ Tested
Reject an escaping relative path
Reject an escaping relative path using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove only a named untracked scratch file
Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.
Git✓ Tested
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
Set an author identity only for this repository
Git: Local configuration avoids changing the identity used by unrelated repositories.
Git✓ Tested
Abort a conflicting cherry-pick
Git: Abort removes the incomplete replay and returns to the previous branch state.
Git✓ Tested