No, that feature isn't directly available on the GitHub web interface (as opposed to the "Revert" button recently added for GitHub for Mac/Windows)

Actually, it is for pull requests only, since June 24th, 2014:

Introducing the Revert Button

you can easily revert a pull request on GitHub by clicking Revert:

You'll be prompted to create a new pull request with the reverted changes:


git revert is a bit more complex to manage through the web as it can accept a range of commits.
It shouldn't be an issue in terms of collaboration though: a revert adds a new commit, it doesn't change the history of existing commits.

Answer from VonC on Stack Overflow
Discussions

How do I revert a commit in a GitHub repository?
Select Topic Area Question Body Could someone explain me the procedure concisely? More on github.com
🌐 github.com
3
2
March 12, 2024
github - How can I rollback a git repository to a specific commit? - Stack Overflow
This will revert the code to the state of the last commit without showing the modified code. When you return to the branch you were working on, you can use the "git stash pop" command to restore the hidden code. (Note 2) If you encounter the error "fatal: unable to access 'https://github.com/x... More on stackoverflow.com
🌐 stackoverflow.com
How to revert a commit from GitHub website?
Well I think you would git revert back to the hash in your master branch then push that back to master no? More on reddit.com
🌐 r/webdev
4
1
December 27, 2019
I want to revert the code to a previous commit.
git checkout -f HEAD~16 -- . will make your code go back 16 commits in your local storage, without rewriting any history with those 16 commits. The "changes" (reverting the past 16 commits) should be at the staging area at this moment. Now you can git commit to commit those reverted code and then git push to update your Github repo. To be sure you did it right, try git diff HEAD..HEAD~17 to compare your branch to the branch 17 commits ago (the 16 commits you wanted to revert + the new commit that did the revert = 17 commits). If the command outputs nothing, you're all good. More on reddit.com
🌐 r/git
4
2
November 8, 2022
🌐
Reddit
reddit.com › r/git › revert to previous commit on github?
r/git on Reddit: revert to previous commit on github?
January 17, 2025 -

Hi, I would like to revert to a previous commit. I believe I did this correctly on my local repository using git reset --hard commit-hash. I would like to push this to github but of this results in

error: failed to push some refs to 'https://github.com/shmish/smartmark.git'
hint: Updates were rejected because the tip of your current branch is behind

I am the only working on this repository, so I am not worried about conflicts, I am trying to move back one commit.

Top answer
1 of 2
14
As a general rule, once you push your repository to a remote repository, your commits should be considered permanent. By resetting your repository to an earlier state, you made it impossible to push to the remote repository. You have a couple options: git push -f will override that rule and allow you to push. I don't recommend this option unless you're the only user of that remote repository. If other people have been pulling from that repository, you will very likely mess them up. You also might not have the necessary permissions to do this if this is someone else's repository. Go back to where you before you executed git reset --hard and do it right. You could execute these steps: commands: git branch foo (makes a placeholder to where you are now) git pull (get your local repository back in sync with the remote) git revert git push What git revert does is construct a whole new commit that un-does the one you want to get rid of. The old one remains in the git history and then there's a new commit that reverses it. There's no way to really get rid of the old one since it's there in the remote repository and in the repositories of anybody who's pulled from it. If what you want to do something more complicated than just reverting one commit, then there is where branch "foo" comes in: git branch foo (makes a placeholder to where you are now) git pull (get your local repository back in sync with the remote) git diff HEAD foo > /tmp/patch patch -p1 < /tmp/patch git commit -a git push If it's not obvious, what this does is construct a patch that will change all the files in your current branch to what they were in your "reverted" branch. Then you apply that patch and commit the changes. My notes on the subject: http://www.efalk.org/Docs/Git/merging.html Disclaimer: these are Unix commands. If you're on Windows, you're on your own here.
2 of 2
4
I am the only working on this repository, so I am not worried about conflicts In this case, a git reset … followed by a git push --force-with-lease is totally fine. (note: a simple push -f would also work, but you should get into the habit of using force-with-lease for later.
🌐
Git
git-scm.com › docs › git-revert.html
Git - git-revert Documentation
This requires your working tree to be clean (no modifications from the HEAD commit). Note: git revert is used to record some new commits to reverse the effect of some earlier commits (often only a faulty one). If you want to throw away all uncommitted changes in your working directory, you should see git-reset[1], particularly the --hard option.
🌐
GitLab
docs.gitlab.com › topics › git › undo
Revert and undo changes | GitLab Docs
When you commit to your local repository with git commit, Git records your changes. Because you did not push to a remote repository yet, your changes are not public or shared with others. At this point, you can undo your changes. You can revert a commit while retaining the commit history.
🌐
GitHub
gist.github.com › gunjanpatel › 18f9e4d1eb609597c50c2118e416e6a6
Git HowTo: revert a commit already pushed to a remote repository · GitHub
If you have the master branch checked out locally, you can also do it in two simpler steps: First reset the branch to the parent of the current commit, then force-push it to the remote. ... This document is inspired by http://christoph.ruegg.name/blog/git-howto-revert-a-commit-already-pushed-to-a-remote-reposit.html - Thank you.
Find elsewhere
🌐
Atlassian
atlassian.com › git › tutorials › undoing changes › git revert
How to Revert a Commit in Git? | Atlassian Git Tutorial
The git revert command is used for undoing changes to a repository's commit history. Other 'undo' commands like, git checkout and git reset, move the HEAD and branch ref pointers to a specified commit. Git revert also takes a specified commit, however, git revert does not move ref pointers ...
🌐
CloudBees
cloudbees.com › blog › git-revert-explained
Git Revert Explained: Safely Undoing Your Changes
November 29, 2021 - It is an “undo” command, but technically it is much more than that. Git revert does not delete any commit in this project history. Instead, it inverts the changes implemented in a commit and appends new commits with the opposite effect.
🌐
Augustana University
lovelace.augustana.edu › q2a › index.php › 7249 › how-can-i-undo-the-latest-3-commit-in-github
How can I undo the latest 3 commit in GitHub - Augustana CSC Q&A
Hi yall, I'm finishing my Step 7, adding a new choice of color in the ComboBox, I'm the ... know how to redo some of my latest commits. Thank you
🌐
SheCanCode
shecancode.io › home › news & articles › how to undo a commit in github
How to undo a commit in GitHub - SheCanCode
May 27, 2025 - To undo a commit that has not been pushed to a remote repository, use the reset command. Note that the reset command should be used if the commits only exist locally. If not, use the revert command, that way the history of undoing your commit ...
🌐
W3Schools
w3schools.com › git › git_revert.asp
Git Revert
Resized image 5a04b6f Updated README.md ... Hello World! Once you've found the commit you want to undo, use git revert to create a new commit that reverses the changes:...
🌐
GitKraken
gitkraken.com › home › learn › problems & solutions › how to revert a git commit
Git Revert Commit | Solutions to Git Problems
February 5, 2024 - In this guide, we’ll delve into the practicalities of using the git revert command—a tool that developers frequently utilize to rectify past errors without losing work. Fundamentally, the git revert function produces an “equal but opposite” commit, effectively neutralizing the impact of a specific commit or group of commits.
🌐
Quora
quora.com › How-do-I-revert-a-GitHub-commit-on-the-website-Is-there-a-link-somewhere-to-revert-a-commit-Or-do-I-need-to-do-this-somehow-from-the-command-line-I-never-downloaded-the-fork-to-my-local-machine-though
How to revert a GitHub commit on the website? Is there a link somewhere to revert a commit? Or do I need to do this somehow from the command line - Quora
Answer (1 of 2): I don't believe there is a way to revert a commit on github.com. (I could be wrong...) Here's how you do it from a command line. git clone my_clone cd my_clone git log (gives you the commit id you want) git revert resolve any errors that may come up and commi...
🌐
Baeldung
baeldung.com › home › git › undo and revert commits in git
Undo and Revert Commits in Git | Baeldung on Ops
February 6, 2024 - To attempt to take back changes, we can use the git revert command. It’s important to remember that this command isn’t a traditional undo operation: it inverts changes introduced by the commit and generates a new commit with the inverse content.
🌐
Aider
aider.chat › docs › usage.html
Usage | aider
Ask aider to make changes to your code. It will show you some diffs of the changes it is making to complete you request. Aider will git commit all of its changes, so they are easy to track and undo.
🌐
Git
git-scm.com › docs › git-commit
Git - git-commit Documentation
For more details, see the pathspec ... can be reverted back, only in the index but not in the working tree, to that of the last commit with git restore --staged <file>, which effectively reverts git add and prevents the changes to this file from participating in the next ...