Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git reset completion #1027

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions custom-completions/git/git-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ export extern "git checkout" [
-l # create reflog for new branch
]

export extern "git reset" [
...targets: string@"nu-complete git checkout" # name of commit, branch, or files to reset to
--hard # reset HEAD, index and working tree
--keep # reset HEAD but keep local changes
--merge # reset HEAD, index and working tree
--mixed # reset HEAD and index
--patch(-p) # select hunks interactively
--quiet(-q) # be quiet, only report errors
--soft # reset only HEAD
--pathspec-from-file: string # read pathspec from file
--pathspec-file-nul # with --pathspec-from-file, pathspec elements are separated with NUL character
--no-refresh # skip refreshing the index after reset
--recurse-submodules: string # control recursive updating of submodules
--no-recurse-submodules # don't recurse into submodules
]

# Download objects and refs from another repository
export extern "git fetch" [
repository?: string@"nu-complete git remotes" # name of the branch to fetch
Expand Down