Results for “author”
Small, practical examples. Search by task or narrow things down below.
Read the current branch name
Git: show-current returns an empty string when HEAD is detached.
Git✓ Tested
Read the exact version currently staged
Git: The colon path syntax reads a blob from the index rather than from HEAD or the working file.
Git✓ Tested
Read the upstream tracked by the current branch
Git: The upstream shorthand resolves the configured remote-tracking branch.
Git✓ 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
Remove stale remote-tracking references
Git: Fetch with prune removes tracking references for branches no longer present on the remote.
Git✓ Tested
Rename a configured remote
Git: Renaming a remote updates its associated configuration and remote-tracking references.
Git✓ Tested
Rename the current branch
Git: branch -m changes the local branch name without creating a new commit.
Git✓ Tested
Replace the URL of a configured remote
Git: set-url changes configuration without fetching or pushing any objects.
Git✓ Tested
Replay an unpublished branch on a newer base
Git: Rebase updates the base of local feature commits when their changes do not conflict.
Git✓ Tested
Resolve a merge by writing the intended final file
Git: After a conflict, edit the result, stage it, and finish the merge commit.
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
Restore the index state recorded in a stash
Git: Apply with index restores which changes were staged as well as their file contents.
Git✓ Tested