k49832hbf07
k49832hbf07

Reputation: 21

Restore repository to a previous GIT commit

I would like to "roll back" a Git repository to a previous commit.

Can someone please explain the process for this? Thanks.

Upvotes: 2

Views: 117

Answers (1)

Schleis
Schleis

Reputation: 43700

You would use git reset --hard [PREVIOUS COMMIT] This resets the repository to the commit dropping all changes.

https://www.kernel.org/pub/software/scm/git/docs/git-reset.html

Upvotes: 2

Related Questions