% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rebase.R
\name{git_reset}
\alias{git_reset}
\alias{git_reset_hard}
\alias{git_reset_soft}
\alias{git_reset_mixed}
\title{Reset your repo to a previous state}
\usage{
git_reset_hard(ref = "HEAD", repo = ".")

git_reset_soft(ref = "HEAD", repo = ".")

git_reset_mixed(ref = "HEAD", repo = ".")
}
\arguments{
\item{ref}{string with a branch/tag/commit}

\item{repo}{The path to the git repository. If the directory is not a
repository, parent directories are considered (see \code{\link[=git_find]{git_find()}}). To disable
this search, provide the filepath protected with \code{\link[=I]{I()}}. When using this
parameter, always explicitly call by name (i.e. \verb{repo = }) because future
versions of gert may have additional parameters.}
}
\description{
\itemize{
\item \code{git_reset_hard()} resets the index and working tree
\item \code{git_reset_soft()} does not touch the index file or the working tree
\item \code{git_reset_mixed()} resets the index but not the working tree.
}
}
\seealso{
Other git:
\code{\link{git_archive}},
\code{\link[=git_branch]{git_branch()}},
\code{\link[=git_commit]{git_commit()}},
\code{\link[=git_config]{git_config()}},
\code{\link[=git_diff]{git_diff()}},
\code{\link[=git_fetch]{git_fetch()}},
\code{\link{git_history}},
\code{\link{git_ignore}},
\code{\link[=git_merge]{git_merge()}},
\code{\link[=git_rebase]{git_rebase()}},
\code{\link{git_remote}},
\code{\link{git_repo}},
\code{\link[=git_restore]{git_restore()}},
\code{\link[=git_revert]{git_revert()}},
\code{\link[=git_signature]{git_signature()}},
\code{\link{git_stash}},
\code{\link{git_tag}},
\code{\link{git_worktree}}
}
\concept{git}
\section{Related libgit2 documentation}{\href{https://libgit2.org/docs/reference/main/reset/index.html}{\code{reset}}.}

