2.41 Reset
(require libgit2/include/reset) | package: libgit2 |
procedure
(git_reset repo target reset_type checkout_opts) → integer? repo : repository? target : object? reset_type : git_reset_t checkout_opts : git_checkout_opts?
SOFT reset means the Head will be moved to the commit.
MIXED reset will trigger a SOFT reset, plus the index will be replaced with the content of the commit tree.
HARD reset will trigger a MIXED reset and the working directory will be replaced with the content of the index. (Untracked and ignored files will be left alone, however.)
TODO: Implement remaining kinds of resets.
procedure
(git_reset_default repo target pathspecs) → integer?
repo : repository? target : (or/c object? #f) pathspecs : strarray?
The scope of the updated entries is determined by the paths being passed in the pathspec parameters.
Passing a NULL target will result in removing entries in the index matching the provided pathspecs.
procedure
(git_reset_from_annotated repo commit reset_type checkout_opts) → integer? repo : repository? commit : annotated_commit? reset_type : git_reset_t checkout_opts : git_checkout_options?
This behaves like git_reset() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
See the documentation for git_reset().