git reset's Examples

This command unstages the file, but it preserves the file contents.

git reset [file]

This command undoes all the commits after the specified commit and preserves the changes locally.

git reset [commit]

This command discards all history and goes back to the specified commit.

git reset –hard [commit]

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us