ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.git-tower.com/learn/git/faq/restore-repo-to-previous-revision |
| Last Crawled | 2026-04-10 16:07:57 (4 hours ago) |
| First Indexed | 2015-12-18 13:53:48 (10 years ago) |
| HTTP Status Code | 200 |
| Meta Title | How can I restore a previous version of my project? | Learn Version Control with Git |
| Meta Description | The quickest way to revert to an older version is to use the "git reset" command. This will remove any commits made after the specified revision. |
| Meta Canonical | null |
| Boilerpipe Text | Using a version control system like Git brings a fantastic benefit: you can return to
any old version
of your project
at any time
.
The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!
Returning to an Old Revision
The fastest way to restore an old version is to use the "reset" command:
$ git reset --hard 0ad5a7a6
This will rewind your HEAD branch to the specified version. All commits that came after this version are effectively undone; your project is exactly as it was at that point in time.
The reset command comes with a couple of options, one of the more interesting ones being the "--soft" flag. If you use it instead of --hard, Git will keep all the changes in those "undone" commits as local modifications:
$ git reset --soft 0ad5a7a6
You'll be left with a couple of changes in your working copy and can then decide what to do with them.
In case you are using the
Tower Git client
, you can use the
reset
command right from a commit's contextual menu. And in case you made a mistake: simply
hit CMD+Z to undo the reset
and restore the removed commits!
Restoring a Revision in a New Local Branch
As said, using the reset command on your HEAD branch is a quite drastic action: it will remove any commits (on this branch) that came after the specified revision. If you're sure that this is what you want, everything is fine.
However, there is also a "safer" way in case you'd prefer leaving your current HEAD branch untouched. Since "branches" are so cheap and easy in Git, we can easily create a new branch which starts at that old revision:
$ git checkout -b old-project-state 0ad5a7a6
Normally, the
checkout
command is used to just
switch
branches. However, providing the -b parameter, you can also let it
create
a new branch (named "old-project-state" in this example). If you
don't
want it to start at the current HEAD revision, you also need to provide a commit hash - the old project revision we want to restore.
VoilĂ : you now have a new branch named "old-project-state" reflecting the old version of your project - without touching or even removing any other commits or branches.
In case you are using the
Tower Git client
, you can simply drag & drop the commit you want to return to and create a new branch:
Learn More
Check out the chapter
Undoing Things
in our free online book |
| Markdown | [Skip to main content](https://www.git-tower.com/learn/git/faq/restore-repo-to-previous-revision#main-content)
[Tower](https://www.git-tower.com/)
Navigation
- [Features](https://www.git-tower.com/features)
- [Undo Anything Just press Cmd+Z](https://www.git-tower.com/features/undo)
- [Drag and Drop Make the complex effortless](https://www.git-tower.com/features/drag-and-drop)
- [Integrations Use your favorite tools](https://www.git-tower.com/features/integrations)
- [Tower Workflows Branching Configurations](https://www.git-tower.com/features/workflows)
- [Stacked Pull Requests Supercharged workflows](https://www.git-tower.com/features/stacked-prs)
- [All Features](https://www.git-tower.com/features/all-features)
- [Release Notes](https://www.git-tower.com/release-notes)
- [Pricing](https://www.git-tower.com/pricing)
- [Support](https://www.git-tower.com/support)
- [Documentation](https://www.git-tower.com/help)
- [Contact Us](https://www.git-tower.com/support/contact)
- [Account Login](https://account.git-tower.com/)
- [Learn Git](https://www.git-tower.com/learn)
- [Video Course 24 episodes](https://www.git-tower.com/learn/git/videos)
- [Online Book From novice to master](https://www.git-tower.com/learn/git/ebook)
- [Cheat Sheets For quick lookup](https://www.git-tower.com/learn/cheat-sheets)
- [Webinar Learn from a Git professional](https://www.git-tower.com/learn/git/webinar)
- [First Aid Kit Recover from mistakes](https://www.git-tower.com/learn/git/first-aid-kit)
- [Advanced Git Kit Dive deeper](https://www.git-tower.com/learn/git/advanced-git-kit)
- [Blog](https://www.git-tower.com/blog)
- [Download](https://www.git-tower.com/download/mac) [Download](https://www.git-tower.com/download/windows)
Git FAQ
Frequently asked questions around Git and Version Control.

# How can I restore a previous version of my project?
Using a version control system like Git brings a fantastic benefit: you can return to *any old version* of your project *at any time*.

## The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free\!
[Download Now for Free]()
## Returning to an Old Revision
The fastest way to restore an old version is to use the "reset" command:
```
$ git reset --hard 0ad5a7a6
```
This will rewind your HEAD branch to the specified version. All commits that came after this version are effectively undone; your project is exactly as it was at that point in time.
The reset command comes with a couple of options, one of the more interesting ones being the "--soft" flag. If you use it instead of --hard, Git will keep all the changes in those "undone" commits as local modifications:
```
$ git reset --soft 0ad5a7a6
```
You'll be left with a couple of changes in your working copy and can then decide what to do with them.
In case you are using the [Tower Git client](https://www.git-tower.com/?utm_source=learn-website&utm_campaign=git-faq&utm_medium=easy-in-tower&utm_content=restore-repo-to-previous-revision), you can use the `reset` command right from a commit's contextual menu. And in case you made a mistake: simply **hit CMD+Z to undo the reset** and restore the removed commits\!
## Restoring a Revision in a New Local Branch
As said, using the reset command on your HEAD branch is a quite drastic action: it will remove any commits (on this branch) that came after the specified revision. If you're sure that this is what you want, everything is fine.
However, there is also a "safer" way in case you'd prefer leaving your current HEAD branch untouched. Since "branches" are so cheap and easy in Git, we can easily create a new branch which starts at that old revision:
```
$ git checkout -b old-project-state 0ad5a7a6
```
Normally, the *checkout* command is used to just *switch* branches. However, providing the -b parameter, you can also let it **create** a new branch (named "old-project-state" in this example). If you *don't* want it to start at the current HEAD revision, you also need to provide a commit hash - the old project revision we want to restore.
VoilĂ : you now have a new branch named "old-project-state" reflecting the old version of your project - without touching or even removing any other commits or branches.
In case you are using the [Tower Git client](https://www.git-tower.com/?utm_source=learn-website&utm_campaign=git-faq&utm_medium=easy-in-tower&utm_content=restore-repo-to-previous-revision), you can simply drag & drop the commit you want to return to and create a new branch:
## Learn More
- Check out the chapter [Undoing Things](https://www.git-tower.com/learn/git/ebook/en/command-line/advanced-topics/undoing-things) in our free online book
***
### Related Questions
- [Understanding the "detached HEAD" state in Git](https://www.git-tower.com/learn/git/faq/detached-head-when-checkout-commit)
- [Restoring deleted files](https://www.git-tower.com/learn/git/faq/restoring-deleted-files)
For additional Git-related questions (and answers!), visit our [FAQ homepage](https://www.git-tower.com/learn/git/faq).
## Get our popular **Git Cheat Sheet** for free\!
You'll find the most important commands on the front and helpful best practice tips on the back. Over 100,000 developers have downloaded it to make Git a little bit easier.

## About Us
As the makers of [Tower, the best Git client for Mac and Windows](https://www.git-tower.com/?utm_source=learn-website&utm_medium=about-us&utm_campaign=learn-git), we help over 100,000 users in companies like Apple, Google, Amazon, Twitter, and Ebay get the most out of Git.
Just like with Tower, our mission with this platform is to help people become better professionals.
That's why we provide our guides, videos, and cheat sheets (about version control with Git and lots of other topics) for free.
[](https://www.git-tower.com/?utm_source=learn-website&utm_medium=about-us&utm_campaign=learn-git)
About
- [About](https://www.git-tower.com/company/about)
- [Blog](https://www.git-tower.com/blog)
- [Merch](https://stuff.git-tower.com/)
- [Tower Git Client](https://www.git-tower.com/)
Git & Version Control
- [Online Book](https://www.git-tower.com/learn/git/ebook)
- [First Aid Kit](https://www.git-tower.com/learn/git/first-aid-kit)
- [Webinar](https://www.git-tower.com/learn/git/webinar)
- [Video Course](https://www.git-tower.com/learn/git/videos)
- [Advanced Git Kit](https://www.git-tower.com/learn/git/advanced-git-kit)
- [FAQ](https://www.git-tower.com/learn/git/faq)
- [Glossary](https://www.git-tower.com/learn/git/glossary)
- [Commands](https://www.git-tower.com/learn/git/commands)
Cheat Sheets
- [Command Line 101](https://www.git-tower.com/learn/cheat-sheets/cli)
- [Git](https://www.git-tower.com/learn/cheat-sheets/git)
- [Git for Subversion Users](https://www.git-tower.com/learn/cheat-sheets/git-for-svn)
- [HTML](https://www.git-tower.com/learn/cheat-sheets/html)
- [Hugo](https://www.git-tower.com/learn/cheat-sheets/hugo)
- [JavaScript](https://www.git-tower.com/learn/cheat-sheets/javascript)
- [Markdown](https://www.git-tower.com/learn/cheat-sheets/markdown)
- [PowerShell](https://www.git-tower.com/learn/cheat-sheets/powershell)
- [Regex](https://www.git-tower.com/learn/cheat-sheets/regex)
- [Ruby on Rails](https://www.git-tower.com/learn/cheat-sheets/ruby-on-rails)
- [Tower Git Client](https://www.git-tower.com/learn/cheat-sheets/tower)
- [Visual Studio Code](https://www.git-tower.com/learn/cheat-sheets/vscode)
- [Website Optimization](https://www.git-tower.com/learn/cheat-sheets/website-optimization)
- [Workflow of Version Control](https://www.git-tower.com/learn/cheat-sheets/vcs-workflow)
- [Working with Branches in Git](https://www.git-tower.com/learn/cheat-sheets/git-branches)
- [Xcode](https://www.git-tower.com/learn/cheat-sheets/xcode)
## Your trial is downloading…
Try Tower "Pro" for 30 days without limitations\!
 Tower
Close
## Updates, Courses & Content via Email
## Thank you for subscribing
Please check your email to confirm
Close
## Want to win one of our awesome Tower shirts? **Tell your friends about Tower\!**
[Share on Twitter](https://www.git-tower.com/learn/git/faq/restore-repo-to-previous-revision)
We'll pick 4 winners every month who share this tweet\!
Follow [@gittower](https://x.com/gittower) to be notified if you win\!
## Try Tower for Free
Sign up below and use Tower "Pro" for 30 days without limitations\!
Close
[Imprint / Legal Notice](https://www.git-tower.com/legal/imprint) \| [Privacy Policy](https://www.git-tower.com/legal/privacy-policy) \| Privacy Settings
© 2010-2026 [Tower](https://www.git-tower.com/) - Mentioned product names and logos are property of their respective owners. |
| Readable Markdown | Using a version control system like Git brings a fantastic benefit: you can return to *any old version* of your project *at any time*.

## The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free\!
## Returning to an Old Revision
The fastest way to restore an old version is to use the "reset" command:
```
$ git reset --hard 0ad5a7a6
```
This will rewind your HEAD branch to the specified version. All commits that came after this version are effectively undone; your project is exactly as it was at that point in time.
The reset command comes with a couple of options, one of the more interesting ones being the "--soft" flag. If you use it instead of --hard, Git will keep all the changes in those "undone" commits as local modifications:
```
$ git reset --soft 0ad5a7a6
```
You'll be left with a couple of changes in your working copy and can then decide what to do with them.
In case you are using the [Tower Git client](https://www.git-tower.com/?utm_source=learn-website&utm_campaign=git-faq&utm_medium=easy-in-tower&utm_content=restore-repo-to-previous-revision), you can use the `reset` command right from a commit's contextual menu. And in case you made a mistake: simply **hit CMD+Z to undo the reset** and restore the removed commits\!
## Restoring a Revision in a New Local Branch
As said, using the reset command on your HEAD branch is a quite drastic action: it will remove any commits (on this branch) that came after the specified revision. If you're sure that this is what you want, everything is fine.
However, there is also a "safer" way in case you'd prefer leaving your current HEAD branch untouched. Since "branches" are so cheap and easy in Git, we can easily create a new branch which starts at that old revision:
```
$ git checkout -b old-project-state 0ad5a7a6
```
Normally, the *checkout* command is used to just *switch* branches. However, providing the -b parameter, you can also let it **create** a new branch (named "old-project-state" in this example). If you *don't* want it to start at the current HEAD revision, you also need to provide a commit hash - the old project revision we want to restore.
VoilĂ : you now have a new branch named "old-project-state" reflecting the old version of your project - without touching or even removing any other commits or branches.
In case you are using the [Tower Git client](https://www.git-tower.com/?utm_source=learn-website&utm_campaign=git-faq&utm_medium=easy-in-tower&utm_content=restore-repo-to-previous-revision), you can simply drag & drop the commit you want to return to and create a new branch:
## Learn More
- Check out the chapter [Undoing Things](https://www.git-tower.com/learn/git/ebook/en/command-line/advanced-topics/undoing-things) in our free online book |
| Shard | 63 (laksa) |
| Root Hash | 2236478454510524063 |
| Unparsed URL | com,git-tower!www,/learn/git/faq/restore-repo-to-previous-revision s443 |