1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-31 14:17:45 +00:00

Add git reset completion (#1027)

Added a git completion for git reset.
This commit is contained in:
Dave 2025-01-28 09:53:33 -05:00 committed by GitHub
parent eaf7ecfd02
commit e6da07f512
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,6 +190,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