🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 44 (from laksa103)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
12 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.4 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.atlassian.com/git/tutorials/undoing-changes/git-revert
Last Crawled2026-04-01 03:50:09 (12 days ago)
First Indexed2017-02-07 23:05:41 (9 years ago)
HTTP Status Code200
Meta TitleHow to Revert a Commit in Git? | Atlassian Git Tutorial
Meta DescriptionLearn how to use Git revert to undo changes in git. This tutorial teaches popular usage of git revert and common pitfalls to avoid.
Meta Canonicalnull
Boilerpipe Text
The git revert command can be considered an 'undo' type command, however, it is not a traditional undo operation. Instead of removing the commit from the project history, it figures out how to invert the changes introduced by the commit and appends a new commit with the resulting inverse content. This prevents Git from losing history, which is important for the integrity of your revision history and for reliable collaboration. Reverting should be used when you want to apply the inverse of a commit from your project history. This can be useful, for example, if you’re tracking down a bug and find that it was introduced by a single commit. Instead of manually going in, fixing it, and committing a new snapshot, you can use git revert to automatically do all of this for you. How it works 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 to this commit. A revert operation will take the specified commit, inverse the changes from that commit, and create a new "revert commit". The ref pointers are then updated to point at the new revert commit making it the tip of the branch. To demonstrate let’s create an example repo using the command line examples below: $ mkdir git_revert_test $ cd git_revert_test/ $ git init . Initialized empty Git repository in /git_revert_test/.git/ $ touch demo_file $ git add demo_file $ git commit -am"initial commit" [main (root-commit) 299b15f] initial commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 demo_file $ echo "initial content" >> demo_file $ git commit -am"add new content to demo file" [main 3602d88] add new content to demo file n 1 file changed, 1 insertion(+) $ echo "prepended line content" >> demo_file $ git commit -am"prepend content to demo file" [main 86bb32e] prepend content to demo file 1 file changed, 1 insertion(+) $ git log --oneline 86bb32e prepend content to demo file 3602d88 add new content to demo file 299b15f initial commit Here we have initialized a repo in a newly created directory named git_revert_test . We have made 3 commits to the repo in which we have added a file demo_file and modified its content twice. At the end of the repo setup procedure, we invoke git log to display the commit history, showing a total of 3 commits. With the repo in this state, we are ready to initiate a git revert. $ git revert HEAD [main b9cd081] Revert "prepend content to demo file" 1 file changed, 1 deletion(-) Git revert expects a commit ref was passed in and will not execute without one. Here we have passed in the HEAD ref. This will revert the latest commit. This is the same behavior as if we reverted to commit 3602d8815dbfa78cd37cd4d189552764b5e96c58 . Similar to a merge, a revert will create a new commit which will open up the configured system editor prompting for a new commit message. Once a commit message has been entered and saved Git will resume operation. We can now examine the state of the repo using git log and see that there is a new commit added to the previous log: $ git log --oneline 1061e79 Revert "prepend content to demo file" 86bb32e prepend content to demo file 3602d88 add new content to demo file 299b15f initial commit Note that the 3rd commit is still in the project history after the revert. Instead of deleting it, git revert added a new commit to undo its changes. As a result, the 2nd and 4th commits represent the exact same code base and the 3rd commit is still in our history just in case we want to go back to it down the road. Common options -e --edit This is a default option and doesn't need to be specified. This option will open the configured system editor and prompts you to edit the commit message prior to committing the revert --no-edit This is the inverse of the -e option. The revert will not open the editor. -n --no-commit Passing this option will prevent git revert from creating a new commit that inverses the target commit. Instead of creating the new commit this option will add the inverse changes to the Staging Index and Working Directory. These are the other trees Git uses to manage the state of the repository. For more info visit the git reset page. Resetting vs. reverting It's important to understand that git revert undoes a single commit—it does not "revert" back to the previous state of a project by removing all subsequent commits. In Git, this is actually called a reset, not a revert. Reverting has two important advantages over resetting. First, it doesn’t change the project history, which makes it a “safe” operation for commits that have already been published to a shared repository. For details about why altering shared history is dangerous, please see the git reset page. Second, git revert is able to target an individual commit at an arbitrary point in the history, whereas git reset can only work backward from the current commit. For example, if you wanted to undo an old commit with git reset , you would have to remove all of the commits that occurred after the target commit, remove it, then re-commit all of the subsequent commits. Needless to say, this is not an elegant undo solution. For a more detailed discussion on the differences between git revert and other 'undo' commands see Resetting, Checking Out and Reverting.   Summary The git revert command is a forward-moving undo operation that offers a safe method of undoing changes. Instead of deleting or orphaning commits in the commit history, a revert will create a new commit that inverses the changes specified. Git revert is a safer alternative to git reset in regards to losing work. To demonstrate the effects of git revert we leveraged other commands that have more in-depth documentation on their individual pages: git log , git commit , and git reset .
Markdown
[Skip to content](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert#content) - [Products](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) Featured Developers Product Managers IT professionals Business Teams Leadership Teams [See all apps](https://www.atlassian.com/software) - ## Featured apps - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) ## Atlassian Collections - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) - [Deliver service at high-velocity Jira Service ManagementCustomer Service ManagementAssets](https://www.atlassian.com/collections/service) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) Powered by [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Bitbucket** Source code and CI/CD](https://www.atlassian.com/software/bitbucket) - [**Rovo Dev** Agentic AI for developers](https://www.atlassian.com/software/rovo-dev) - [**Pipelines** Scalable CI/CD automation](https://www.atlassian.com/software/bitbucket/features/pipelines) - [**DX** Measure productivity and AI impact](https://www.atlassian.com/collections/software) - [**Compass** Software catalog for teams](https://www.atlassian.com/software/compass) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [**Jira Product Discovery** Capture & prioritize ideas](https://www.atlassian.com/software/jira/product-discovery) - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Guard** Enhanced cloud security](https://www.atlassian.com/software/guard) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [**Trello** Capture and organize your tasks](https://trello.com/home) - [**Loom** Quick, async video updates](https://www.atlassian.com/software/loom) - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Customer Service Management** Customer experiences reimagined](https://www.atlassian.com/software/customer-service-management) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [**Focus** Enterprise-scale strategic planning](https://www.atlassian.com/software/focus) - [**Talent** Knowledge workforce planning](https://www.atlassian.com/software/talent) - [**Align** Enterprise-wide work planning & value](https://www.atlassian.com/software/jira/align) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [Solutions](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) Solutions ## By Use Case - [Team collaboration](https://www.atlassian.com/collections/teamwork) - [Strategy and planning](https://www.atlassian.com/collections/strategy) - [Service management](https://www.atlassian.com/collections/service) - [Software development](https://www.atlassian.com/collections/software) ## By Team - [Software](https://www.atlassian.com/collections/software) - [Marketing](https://www.atlassian.com/teams/marketing) - [IT](https://www.atlassian.com/teams/it) - [Product](https://www.atlassian.com/software/jira/product-discovery%20) ## By Size - [Enterprise](https://www.atlassian.com/enterprise) - [Small Business](https://www.atlassian.com/software/small-business) - [Startup](https://www.atlassian.com/software/startups) - [Non-profit](https://www.atlassian.com/teams/nonprofits) ## By Industry - [Retail](https://www.atlassian.com/industries/retail) - [Telecommunications](https://www.atlassian.com/industries/telecom) - [Professional Services](https://www.atlassian.com/industries/professional-services) - [Government](https://www.atlassian.com/government) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) - [Why Atlassian?](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [System of Work NewAtlassian's blueprint for how teams work together](https://www.atlassian.com/system-of-work) - [MarketplaceConnect thousands of apps to your Atlassian products](https://marketplace.atlassian.com/) - [CustomersCase studies & stories powered by teamwork](https://www.atlassian.com/customers) - [FedRAMPCompliant solutions for the public sector](https://www.atlassian.com/trust/compliance/resources/fedramp) - [ResilienceEnterprise-grade & highly performant infrastructure](https://www.atlassian.com/trust/resilience) - [PlatformOur deeply integrated, reliable & secure platform](https://www.atlassian.com/platform) - [Trust centerEnsure your data's security, compliance & availability](https://www.atlassian.com/trust) - [Resources](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [Customer SupportAsk questions, report bugs & give us feedback](https://support.atlassian.com/) - [Find PartnersConsulting, training & product customization support](https://partnerdirectory.atlassian.com/) - [Atlassian AscendResources and support for your transformation](https://www.atlassian.com/migration) - [CommunityLearn, connect and grow with the Atlassian Community](https://community.atlassian.com/) ## Support ## Resources - [Enterprise](https://www.atlassian.com/enterprise) - More + Get it free Sign in Sign in - Products - Featured - Developers - Product Managers - IT professionals - Business Teams - Leadership Teams - Solutions - Why Atlassian? - Resources - [Enterprise](https://www.atlassian.com/enterprise) [Sign in](https://id.atlassian.com/login?continue=https%3A%2F%2Fwww.atlassian.com%2Fgateway%2Fapi%2Fstart%2Fauthredirect) - ## Featured apps - [Jira Flexible project management](https://www.atlassian.com/software/jira) - [Confluence Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [Jira Service Management Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) ## Atlassian Collections - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) - [Deliver service at high-velocity Jira Service ManagementCustomer Service ManagementAssets](https://www.atlassian.com/collections/service) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) Powered by [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Developers - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Bitbucket** Source code and CI/CD](https://www.atlassian.com/software/bitbucket) - [**Rovo Dev** Agentic AI for developers](https://www.atlassian.com/software/rovo-dev) - [**Pipelines** Scalable CI/CD automation](https://www.atlassian.com/software/bitbucket/features/pipelines) - [**DX** Measure productivity and AI impact](https://www.atlassian.com/collections/software) - [**Compass** Software catalog for teams](https://www.atlassian.com/software/compass) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Product Managers - [**Jira Product Discovery** Capture & prioritize ideas](https://www.atlassian.com/software/jira/product-discovery) - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) IT professionals - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Guard** Enhanced cloud security](https://www.atlassian.com/software/guard) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Business Teams - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [**Trello** Capture and organize your tasks](https://trello.com/home) - [**Loom** Quick, async video updates](https://www.atlassian.com/software/loom) - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Customer Service Management** Customer experiences reimagined](https://www.atlassian.com/software/customer-service-management) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Leadership Teams - [**Focus** Enterprise-scale strategic planning](https://www.atlassian.com/software/focus) - [**Talent** Knowledge workforce planning](https://www.atlassian.com/software/talent) - [**Align** Enterprise-wide work planning & value](https://www.atlassian.com/software/jira/align) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Solutions ## By Use Case - [Team collaboration](https://www.atlassian.com/collections/teamwork) - [Strategy and planning](https://www.atlassian.com/collections/strategy) - [Service management](https://www.atlassian.com/collections/service) - [Software development](https://www.atlassian.com/collections/software) ## By Team - [Software](https://www.atlassian.com/collections/software) - [Marketing](https://www.atlassian.com/teams/marketing) - [IT](https://www.atlassian.com/teams/it) - [Product](https://www.atlassian.com/software/jira/product-discovery%20) ## By Size - [Enterprise](https://www.atlassian.com/enterprise) - [Small Business](https://www.atlassian.com/software/small-business) - [Startup](https://www.atlassian.com/software/startups) - [Non-profit](https://www.atlassian.com/teams/nonprofits) ## By Industry - [Retail](https://www.atlassian.com/industries/retail) - [Telecommunications](https://www.atlassian.com/industries/telecom) - [Professional Services](https://www.atlassian.com/industries/professional-services) - [Government](https://www.atlassian.com/government) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Why Atlassian [System of Work NewAtlassian's blueprint for how teams work together](https://www.atlassian.com/system-of-work) [MarketplaceConnect thousands of apps to your Atlassian products](https://marketplace.atlassian.com/) [CustomersCase studies & stories powered by teamwork](https://www.atlassian.com/customers) [FedRAMPCompliant solutions for the public sector](https://www.atlassian.com/trust/compliance/resources/fedramp) [ResilienceEnterprise-grade & highly performant infrastructure](https://www.atlassian.com/trust/resilience) [PlatformOur deeply integrated, reliable & secure platform](https://www.atlassian.com/platform) [Trust centerEnsure your data's security, compliance & availability](https://www.atlassian.com/trust) Resources [Customer SupportAsk questions, report bugs & give us feedback](https://support.atlassian.com/) [Find PartnersConsulting, training & product customization support](https://partnerdirectory.atlassian.com/) [Atlassian AscendResources and support for your transformation](https://www.atlassian.com/migration) [CommunityLearn, connect and grow with the Atlassian Community](https://community.atlassian.com/) Support - [General Inquiries](https://www.atlassian.com/company/contact/general-inquiries) - [Technical Support](https://support.atlassian.com/contact/) - [Product Advice](https://www.atlassian.com/company/contact/product-evaluator-advice) - [Pricing and Billing](https://www.atlassian.com/company/contact/purchasing-licensing) - [Partner Support](https://www.atlassian.com/partners) - [Developer Support](https://developer.atlassian.com/) - [Enterprise Support](https://www.atlassian.com/enterprise/services) - [Purchasing and Licensing](https://www.atlassian.com/licensing/purchase-licensing) Resources - [Project Management](https://www.atlassian.com/project-management) - [Project Collaboration](https://www.atlassian.com/work-management/project-collaboration) - [Agile](https://www.atlassian.com/agile) - [Team Playbook](https://www.atlassian.com/team-playbook) - [Atlassian Learning](https://community.atlassian.com/learning) - [Product Documentation](https://confluence.atlassian.com/display/ALLDOC/Atlassian+Documentation) - [Get Started](https://www.atlassian.com/get-started) [Skip to content](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert#content) - Products - Featured - Developers - Product Managers - IT professionals - Business Teams - Leadership Teams - Solutions - Why Atlassian? - Resources - [Enterprise](https://www.atlassian.com/enterprise) [Sign in](https://id.atlassian.com/login?continue=https%3A%2F%2Fwww.atlassian.com%2Fgateway%2Fapi%2Fstart%2Fauthredirect) - ## Featured apps - [Jira Flexible project management](https://www.atlassian.com/software/jira) - [Confluence Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [Jira Service Management Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) ## Atlassian Collections - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) - [Deliver service at high-velocity Jira Service ManagementCustomer Service ManagementAssets](https://www.atlassian.com/collections/service) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) Powered by [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Developers - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Bitbucket** Source code and CI/CD](https://www.atlassian.com/software/bitbucket) - [**Rovo Dev** Agentic AI for developers](https://www.atlassian.com/software/rovo-dev) - [**Pipelines** Scalable CI/CD automation](https://www.atlassian.com/software/bitbucket/features/pipelines) - [**DX** Measure productivity and AI impact](https://www.atlassian.com/collections/software) - [**Compass** Software catalog for teams](https://www.atlassian.com/software/compass) - [Ship high-quality software fast Rovo DevDXPipelinesBitbucketCompass](https://www.atlassian.com/collections/software) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Product Managers - [**Jira Product Discovery** Capture & prioritize ideas](https://www.atlassian.com/software/jira/product-discovery) - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) IT professionals - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Guard** Enhanced cloud security](https://www.atlassian.com/software/guard) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Business Teams - [**Jira** Flexible project management](https://www.atlassian.com/software/jira) - [**Confluence** Knowledge, all in one place](https://www.atlassian.com/software/confluence) - [**Trello** Capture and organize your tasks](https://trello.com/home) - [**Loom** Quick, async video updates](https://www.atlassian.com/software/loom) - [**Jira Service Management** Deliver service at high velocity](https://www.atlassian.com/software/jira/service-management) - [**Customer Service Management** Customer experiences reimagined](https://www.atlassian.com/software/customer-service-management) - [Supercharge teamwork seamlessly JiraConfluenceLoom](https://www.atlassian.com/collections/teamwork) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Leadership Teams - [**Focus** Enterprise-scale strategic planning](https://www.atlassian.com/software/focus) - [**Talent** Knowledge workforce planning](https://www.atlassian.com/software/talent) - [**Align** Enterprise-wide work planning & value](https://www.atlassian.com/software/jira/align) - [Optimize strategy and outcomes confidently FocusTalentAlign](https://www.atlassian.com/collections/strategy) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Solutions ## By Use Case - [Team collaboration](https://www.atlassian.com/collections/teamwork) - [Strategy and planning](https://www.atlassian.com/collections/strategy) - [Service management](https://www.atlassian.com/collections/service) - [Software development](https://www.atlassian.com/collections/software) ## By Team - [Software](https://www.atlassian.com/collections/software) - [Marketing](https://www.atlassian.com/teams/marketing) - [IT](https://www.atlassian.com/teams/it) - [Product](https://www.atlassian.com/software/jira/product-discovery%20) ## By Size - [Enterprise](https://www.atlassian.com/enterprise) - [Small Business](https://www.atlassian.com/software/small-business) - [Startup](https://www.atlassian.com/software/startups) - [Non-profit](https://www.atlassian.com/teams/nonprofits) ## By Industry - [Retail](https://www.atlassian.com/industries/retail) - [Telecommunications](https://www.atlassian.com/industries/telecom) - [Professional Services](https://www.atlassian.com/industries/professional-services) - [Government](https://www.atlassian.com/government) [Rovo AI-powered apps – driven by your team's knowledge.](https://www.atlassian.com/software/rovo) Why Atlassian [System of Work NewAtlassian's blueprint for how teams work together](https://www.atlassian.com/system-of-work) [MarketplaceConnect thousands of apps to your Atlassian products](https://marketplace.atlassian.com/) [CustomersCase studies & stories powered by teamwork](https://www.atlassian.com/customers) [FedRAMPCompliant solutions for the public sector](https://www.atlassian.com/trust/compliance/resources/fedramp) [ResilienceEnterprise-grade & highly performant infrastructure](https://www.atlassian.com/trust/resilience) [PlatformOur deeply integrated, reliable & secure platform](https://www.atlassian.com/platform) [Trust centerEnsure your data's security, compliance & availability](https://www.atlassian.com/trust) Resources [Customer SupportAsk questions, report bugs & give us feedback](https://support.atlassian.com/) [Find PartnersConsulting, training & product customization support](https://partnerdirectory.atlassian.com/) [Atlassian AscendResources and support for your transformation](https://www.atlassian.com/migration) [CommunityLearn, connect and grow with the Atlassian Community](https://community.atlassian.com/) Support - [General Inquiries](https://www.atlassian.com/company/contact/general-inquiries) - [Technical Support](https://support.atlassian.com/contact/) - [Product Advice](https://www.atlassian.com/company/contact/product-evaluator-advice) - [Pricing and Billing](https://www.atlassian.com/company/contact/purchasing-licensing) - [Partner Support](https://www.atlassian.com/partners) - [Developer Support](https://developer.atlassian.com/) - [Enterprise Support](https://www.atlassian.com/enterprise/services) - [Purchasing and Licensing](https://www.atlassian.com/licensing/purchase-licensing) Resources - [Project Management](https://www.atlassian.com/project-management) - [Project Collaboration](https://www.atlassian.com/work-management/project-collaboration) - [Agile](https://www.atlassian.com/agile) - [Team Playbook](https://www.atlassian.com/team-playbook) - [Atlassian Learning](https://community.atlassian.com/learning) - [Product Documentation](https://confluence.atlassian.com/display/ALLDOC/Atlassian+Documentation) - [Get Started](https://www.atlassian.com/get-started) Git topics - Learn Git - [Git commands](https://www.atlassian.com/git/glossary) - [Learn Git with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud) - [Learn about code review in Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-about-code-review-in-bitbucket-cloud) - [Learn Branching with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-branching-with-bitbucket-cloud) - [Learn Undoing Changes with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket) - Beginner - [What is version control](https://www.atlassian.com/git/tutorials/what-is-version-control) - [Source Code Management](https://www.atlassian.com/git/tutorials/source-code-management) - [What is Git](https://www.atlassian.com/git/tutorials/what-is-git) - [Why Git for your organization](https://www.atlassian.com/git/tutorials/why-git) - [Install Git](https://www.atlassian.com/git/tutorials/install-git) - [Git SSH](https://www.atlassian.com/git/tutorials/git-ssh) - [Git archive](https://www.atlassian.com/git/tutorials/export-git-archive) - [GitOps](https://www.atlassian.com/git/tutorials/gitops) - [Git cheat sheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet) - Getting started - Setting up a repository - [Overview](https://www.atlassian.com/git/tutorials/setting-up-a-repository) - [git init](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init) - [git clone](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone) - [git config](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config) - [git alias](https://www.atlassian.com/git/tutorials/git-alias) - Saving changes (Git add) - [Overview](https://www.atlassian.com/git/tutorials/saving-changes) - [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) - [git diff](https://www.atlassian.com/git/tutorials/saving-changes/git-diff) - [git stash](https://www.atlassian.com/git/tutorials/saving-changes/git-stash) - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore) - Inspecting a repository - [Overview](https://www.atlassian.com/git/tutorials/inspecting-a-repository) - [git tag](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag) - [git blame](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame) - Undoing changes - [Overview](https://www.atlassian.com/git/tutorials/undoing-changes) - [git clean](https://www.atlassian.com/git/tutorials/undoing-changes/git-clean) - [git revert](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) - [git rm](https://www.atlassian.com/git/tutorials/undoing-changes/git-rm) - Rewriting history - [Overview](https://www.atlassian.com/git/tutorials/rewriting-history) - [git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) - [git reflog](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog) - Collaborating workflows - Syncing (git remote) - [Overview](https://www.atlassian.com/git/tutorials/syncing) - [git fetch](https://www.atlassian.com/git/tutorials/syncing/git-fetch) - [git push](https://www.atlassian.com/git/tutorials/syncing/git-push) - [git pull](https://www.atlassian.com/git/tutorials/syncing/git-pull) - [Making a Pull Request](https://www.atlassian.com/git/tutorials/making-a-pull-request) - Using Branches (Git branch) - [Overview](https://www.atlassian.com/git/tutorials/using-branches) - [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) - [git merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge) - [Merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) - [Merge strategies](https://www.atlassian.com/git/tutorials/using-branches/merge-strategy) - Comparing Workflows - [Overview](https://www.atlassian.com/git/tutorials/comparing-workflows) - [Feature Branch Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) - [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) - [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) - Migrating to Git - [SVN to Git - prepping for the migration](https://www.atlassian.com/git/tutorials/svn-to-git-prepping-your-team-migration) - Migrate to Git from SVN - [Overview](https://www.atlassian.com/git/tutorials/migrating-overview) - [Prepare](https://www.atlassian.com/git/tutorials/migrating-prepare) - [Convert](https://www.atlassian.com/git/tutorials/migrating-convert) - [Synchronize](https://www.atlassian.com/git/tutorials/migrating-synchronize) - [Share](https://www.atlassian.com/git/tutorials/migrating-share) - [Migrate](https://www.atlassian.com/git/tutorials/migrating-migrate) - [Perforce to Git - why to make the move](https://www.atlassian.com/git/tutorials/perforce-git) - [Migrating from Perforce to Git](https://www.atlassian.com/git/tutorials/perforce-git-migration) - [Working with Git and Perforce: integration workflow](https://www.atlassian.com/git/tutorials/git-p4) - [How to move a Git repository with history](https://www.atlassian.com/git/tutorials/git-move-repository) - Advanced Tips - [Overview](https://www.atlassian.com/git/tutorials/advanced-overview) - [Merging vs. Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) - [Reset, Checkout, and Revert](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) - [Advanced Git log](https://www.atlassian.com/git/tutorials/git-log) - [Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks) - [Refs and the Reflog](https://www.atlassian.com/git/tutorials/refs-and-the-reflog) - [Git submodules](https://www.atlassian.com/git/tutorials/git-submodule) - [Git subtree](https://www.atlassian.com/git/tutorials/git-subtree) - [Large repositories in Git](https://www.atlassian.com/git/tutorials/big-repositories) - [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs) - [Git gc](https://www.atlassian.com/git/tutorials/git-gc) - [Git prune](https://www.atlassian.com/git/tutorials/git-prune) - [Git bash](https://www.atlassian.com/git/tutorials/git-bash) - [How to store dotfiles](https://www.atlassian.com/git/tutorials/dotfiles) - [Git cherry pick](https://www.atlassian.com/git/tutorials/cherry-pick) - [GitK](https://www.atlassian.com/git/tutorials/gitk) - [Git-show](https://www.atlassian.com/git/tutorials/git-show) - Articles - [Dealing with Maven dependencies when switching to Git](https://www.atlassian.com/git/articles/maven-dependencies-versions-merging) - [Pull request proficiency: Fetching abilities unlocked\!](https://www.atlassian.com/git/articles/pull-request-proficiency-fetching-abilities-unlocked) - [Git and project dependencies](https://www.atlassian.com/git/articles/git-and-project-dependencies) - [Git or SVN? How Nuance Healthcare Chose a Git Branching Model](https://www.atlassian.com/git/articles/git-or-svn-git-branching-model) - [Git Forks And Upstreams: How-to and a cool tip](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) - [Core concept, workflows and tips](https://www.atlassian.com/git/articles/core-concept-workflows-and-tips) Git topics - Learn Git - [Git commands](https://www.atlassian.com/git/glossary) - [Learn Git with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud) - [Learn about code review in Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-about-code-review-in-bitbucket-cloud) - [Learn Branching with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-branching-with-bitbucket-cloud) - [Learn Undoing Changes with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket) - Beginner - [What is version control](https://www.atlassian.com/git/tutorials/what-is-version-control) - [Source Code Management](https://www.atlassian.com/git/tutorials/source-code-management) - [What is Git](https://www.atlassian.com/git/tutorials/what-is-git) - [Why Git for your organization](https://www.atlassian.com/git/tutorials/why-git) - [Install Git](https://www.atlassian.com/git/tutorials/install-git) - [Git SSH](https://www.atlassian.com/git/tutorials/git-ssh) - [Git archive](https://www.atlassian.com/git/tutorials/export-git-archive) - [GitOps](https://www.atlassian.com/git/tutorials/gitops) - [Git cheat sheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet) - Getting started - Setting up a repository - [Overview](https://www.atlassian.com/git/tutorials/setting-up-a-repository) - [git init](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init) - [git clone](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone) - [git config](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config) - [git alias](https://www.atlassian.com/git/tutorials/git-alias) - Saving changes (Git add) - [Overview](https://www.atlassian.com/git/tutorials/saving-changes) - [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) - [git diff](https://www.atlassian.com/git/tutorials/saving-changes/git-diff) - [git stash](https://www.atlassian.com/git/tutorials/saving-changes/git-stash) - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore) - Inspecting a repository - [Overview](https://www.atlassian.com/git/tutorials/inspecting-a-repository) - [git tag](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag) - [git blame](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame) - Undoing changes - [Overview](https://www.atlassian.com/git/tutorials/undoing-changes) - [git clean](https://www.atlassian.com/git/tutorials/undoing-changes/git-clean) - [git revert](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) - [git rm](https://www.atlassian.com/git/tutorials/undoing-changes/git-rm) - Rewriting history - [Overview](https://www.atlassian.com/git/tutorials/rewriting-history) - [git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) - [git reflog](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog) - Collaborating workflows - Syncing (git remote) - [Overview](https://www.atlassian.com/git/tutorials/syncing) - [git fetch](https://www.atlassian.com/git/tutorials/syncing/git-fetch) - [git push](https://www.atlassian.com/git/tutorials/syncing/git-push) - [git pull](https://www.atlassian.com/git/tutorials/syncing/git-pull) - [Making a Pull Request](https://www.atlassian.com/git/tutorials/making-a-pull-request) - Using Branches (Git branch) - [Overview](https://www.atlassian.com/git/tutorials/using-branches) - [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) - [git merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge) - [Merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) - [Merge strategies](https://www.atlassian.com/git/tutorials/using-branches/merge-strategy) - Comparing Workflows - [Overview](https://www.atlassian.com/git/tutorials/comparing-workflows) - [Feature Branch Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) - [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) - [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) - Migrating to Git - [SVN to Git - prepping for the migration](https://www.atlassian.com/git/tutorials/svn-to-git-prepping-your-team-migration) - Migrate to Git from SVN - [Overview](https://www.atlassian.com/git/tutorials/migrating-overview) - [Prepare](https://www.atlassian.com/git/tutorials/migrating-prepare) - [Convert](https://www.atlassian.com/git/tutorials/migrating-convert) - [Synchronize](https://www.atlassian.com/git/tutorials/migrating-synchronize) - [Share](https://www.atlassian.com/git/tutorials/migrating-share) - [Migrate](https://www.atlassian.com/git/tutorials/migrating-migrate) - [Perforce to Git - why to make the move](https://www.atlassian.com/git/tutorials/perforce-git) - [Migrating from Perforce to Git](https://www.atlassian.com/git/tutorials/perforce-git-migration) - [Working with Git and Perforce: integration workflow](https://www.atlassian.com/git/tutorials/git-p4) - [How to move a Git repository with history](https://www.atlassian.com/git/tutorials/git-move-repository) - Advanced Tips - [Overview](https://www.atlassian.com/git/tutorials/advanced-overview) - [Merging vs. Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) - [Reset, Checkout, and Revert](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) - [Advanced Git log](https://www.atlassian.com/git/tutorials/git-log) - [Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks) - [Refs and the Reflog](https://www.atlassian.com/git/tutorials/refs-and-the-reflog) - [Git submodules](https://www.atlassian.com/git/tutorials/git-submodule) - [Git subtree](https://www.atlassian.com/git/tutorials/git-subtree) - [Large repositories in Git](https://www.atlassian.com/git/tutorials/big-repositories) - [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs) - [Git gc](https://www.atlassian.com/git/tutorials/git-gc) - [Git prune](https://www.atlassian.com/git/tutorials/git-prune) - [Git bash](https://www.atlassian.com/git/tutorials/git-bash) - [How to store dotfiles](https://www.atlassian.com/git/tutorials/dotfiles) - [Git cherry pick](https://www.atlassian.com/git/tutorials/cherry-pick) - [GitK](https://www.atlassian.com/git/tutorials/gitk) - [Git-show](https://www.atlassian.com/git/tutorials/git-show) - Articles - [Dealing with Maven dependencies when switching to Git](https://www.atlassian.com/git/articles/maven-dependencies-versions-merging) - [Pull request proficiency: Fetching abilities unlocked\!](https://www.atlassian.com/git/articles/pull-request-proficiency-fetching-abilities-unlocked) - [Git and project dependencies](https://www.atlassian.com/git/articles/git-and-project-dependencies) - [Git or SVN? How Nuance Healthcare Chose a Git Branching Model](https://www.atlassian.com/git/articles/git-or-svn-git-branching-model) - [Git Forks And Upstreams: How-to and a cool tip](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) - [Core concept, workflows and tips](https://www.atlassian.com/git/articles/core-concept-workflows-and-tips) Git topics - Learn Git - [Git commands](https://www.atlassian.com/git/glossary) - [Learn Git with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud) - [Learn about code review in Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-about-code-review-in-bitbucket-cloud) - [Learn Branching with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-branching-with-bitbucket-cloud) - [Learn Undoing Changes with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket) - Beginner - [What is version control](https://www.atlassian.com/git/tutorials/what-is-version-control) - [Source Code Management](https://www.atlassian.com/git/tutorials/source-code-management) - [What is Git](https://www.atlassian.com/git/tutorials/what-is-git) - [Why Git for your organization](https://www.atlassian.com/git/tutorials/why-git) - [Install Git](https://www.atlassian.com/git/tutorials/install-git) - [Git SSH](https://www.atlassian.com/git/tutorials/git-ssh) - [Git archive](https://www.atlassian.com/git/tutorials/export-git-archive) - [GitOps](https://www.atlassian.com/git/tutorials/gitops) - [Git cheat sheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet) - Getting started - Setting up a repository - [Overview](https://www.atlassian.com/git/tutorials/setting-up-a-repository) - [git init](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init) - [git clone](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone) - [git config](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config) - [git alias](https://www.atlassian.com/git/tutorials/git-alias) - Saving changes (Git add) - [Overview](https://www.atlassian.com/git/tutorials/saving-changes) - [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) - [git diff](https://www.atlassian.com/git/tutorials/saving-changes/git-diff) - [git stash](https://www.atlassian.com/git/tutorials/saving-changes/git-stash) - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore) - Inspecting a repository - [Overview](https://www.atlassian.com/git/tutorials/inspecting-a-repository) - [git tag](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag) - [git blame](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame) - Undoing changes - [Overview](https://www.atlassian.com/git/tutorials/undoing-changes) - [git clean](https://www.atlassian.com/git/tutorials/undoing-changes/git-clean) - [git revert](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) - [git rm](https://www.atlassian.com/git/tutorials/undoing-changes/git-rm) - Rewriting history - [Overview](https://www.atlassian.com/git/tutorials/rewriting-history) - [git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) - [git reflog](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog) - Collaborating workflows - Syncing (git remote) - [Overview](https://www.atlassian.com/git/tutorials/syncing) - [git fetch](https://www.atlassian.com/git/tutorials/syncing/git-fetch) - [git push](https://www.atlassian.com/git/tutorials/syncing/git-push) - [git pull](https://www.atlassian.com/git/tutorials/syncing/git-pull) - [Making a Pull Request](https://www.atlassian.com/git/tutorials/making-a-pull-request) - Using Branches (Git branch) - [Overview](https://www.atlassian.com/git/tutorials/using-branches) - [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) - [git merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge) - [Merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) - [Merge strategies](https://www.atlassian.com/git/tutorials/using-branches/merge-strategy) - Comparing Workflows - [Overview](https://www.atlassian.com/git/tutorials/comparing-workflows) - [Feature Branch Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) - [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) - [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) - Migrating to Git - [SVN to Git - prepping for the migration](https://www.atlassian.com/git/tutorials/svn-to-git-prepping-your-team-migration) - Migrate to Git from SVN - [Overview](https://www.atlassian.com/git/tutorials/migrating-overview) - [Prepare](https://www.atlassian.com/git/tutorials/migrating-prepare) - [Convert](https://www.atlassian.com/git/tutorials/migrating-convert) - [Synchronize](https://www.atlassian.com/git/tutorials/migrating-synchronize) - [Share](https://www.atlassian.com/git/tutorials/migrating-share) - [Migrate](https://www.atlassian.com/git/tutorials/migrating-migrate) - [Perforce to Git - why to make the move](https://www.atlassian.com/git/tutorials/perforce-git) - [Migrating from Perforce to Git](https://www.atlassian.com/git/tutorials/perforce-git-migration) - [Working with Git and Perforce: integration workflow](https://www.atlassian.com/git/tutorials/git-p4) - [How to move a Git repository with history](https://www.atlassian.com/git/tutorials/git-move-repository) - Advanced Tips - [Overview](https://www.atlassian.com/git/tutorials/advanced-overview) - [Merging vs. Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) - [Reset, Checkout, and Revert](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) - [Advanced Git log](https://www.atlassian.com/git/tutorials/git-log) - [Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks) - [Refs and the Reflog](https://www.atlassian.com/git/tutorials/refs-and-the-reflog) - [Git submodules](https://www.atlassian.com/git/tutorials/git-submodule) - [Git subtree](https://www.atlassian.com/git/tutorials/git-subtree) - [Large repositories in Git](https://www.atlassian.com/git/tutorials/big-repositories) - [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs) - [Git gc](https://www.atlassian.com/git/tutorials/git-gc) - [Git prune](https://www.atlassian.com/git/tutorials/git-prune) - [Git bash](https://www.atlassian.com/git/tutorials/git-bash) - [How to store dotfiles](https://www.atlassian.com/git/tutorials/dotfiles) - [Git cherry pick](https://www.atlassian.com/git/tutorials/cherry-pick) - [GitK](https://www.atlassian.com/git/tutorials/gitk) - [Git-show](https://www.atlassian.com/git/tutorials/git-show) - Articles - [Dealing with Maven dependencies when switching to Git](https://www.atlassian.com/git/articles/maven-dependencies-versions-merging) - [Pull request proficiency: Fetching abilities unlocked\!](https://www.atlassian.com/git/articles/pull-request-proficiency-fetching-abilities-unlocked) - [Git and project dependencies](https://www.atlassian.com/git/articles/git-and-project-dependencies) - [Git or SVN? How Nuance Healthcare Chose a Git Branching Model](https://www.atlassian.com/git/articles/git-or-svn-git-branching-model) - [Git Forks And Upstreams: How-to and a cool tip](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) - [Core concept, workflows and tips](https://www.atlassian.com/git/articles/core-concept-workflows-and-tips) Git topics - Learn Git - [Git commands](https://www.atlassian.com/git/glossary) - [Learn Git with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud) - [Learn about code review in Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-about-code-review-in-bitbucket-cloud) - [Learn Branching with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-branching-with-bitbucket-cloud) - [Learn Undoing Changes with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket) - Beginner - [What is version control](https://www.atlassian.com/git/tutorials/what-is-version-control) - [Source Code Management](https://www.atlassian.com/git/tutorials/source-code-management) - [What is Git](https://www.atlassian.com/git/tutorials/what-is-git) - [Why Git for your organization](https://www.atlassian.com/git/tutorials/why-git) - [Install Git](https://www.atlassian.com/git/tutorials/install-git) - [Git SSH](https://www.atlassian.com/git/tutorials/git-ssh) - [Git archive](https://www.atlassian.com/git/tutorials/export-git-archive) - [GitOps](https://www.atlassian.com/git/tutorials/gitops) - [Git cheat sheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet) - Getting started - Setting up a repository - [Overview](https://www.atlassian.com/git/tutorials/setting-up-a-repository) - [git init](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init) - [git clone](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone) - [git config](https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config) - [git alias](https://www.atlassian.com/git/tutorials/git-alias) - Saving changes (Git add) - [Overview](https://www.atlassian.com/git/tutorials/saving-changes) - [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) - [git diff](https://www.atlassian.com/git/tutorials/saving-changes/git-diff) - [git stash](https://www.atlassian.com/git/tutorials/saving-changes/git-stash) - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore) - Inspecting a repository - [Overview](https://www.atlassian.com/git/tutorials/inspecting-a-repository) - [git tag](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag) - [git blame](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame) - Undoing changes - [Overview](https://www.atlassian.com/git/tutorials/undoing-changes) - [git clean](https://www.atlassian.com/git/tutorials/undoing-changes/git-clean) - [git revert](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert) - [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) - [git rm](https://www.atlassian.com/git/tutorials/undoing-changes/git-rm) - Rewriting history - [Overview](https://www.atlassian.com/git/tutorials/rewriting-history) - [git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) - [git reflog](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog) - Collaborating workflows - Syncing (git remote) - [Overview](https://www.atlassian.com/git/tutorials/syncing) - [git fetch](https://www.atlassian.com/git/tutorials/syncing/git-fetch) - [git push](https://www.atlassian.com/git/tutorials/syncing/git-push) - [git pull](https://www.atlassian.com/git/tutorials/syncing/git-pull) - [Making a Pull Request](https://www.atlassian.com/git/tutorials/making-a-pull-request) - Using Branches (Git branch) - [Overview](https://www.atlassian.com/git/tutorials/using-branches) - [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) - [git merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge) - [Merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts) - [Merge strategies](https://www.atlassian.com/git/tutorials/using-branches/merge-strategy) - Comparing Workflows - [Overview](https://www.atlassian.com/git/tutorials/comparing-workflows) - [Feature Branch Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) - [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) - [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) - Migrating to Git - [SVN to Git - prepping for the migration](https://www.atlassian.com/git/tutorials/svn-to-git-prepping-your-team-migration) - Migrate to Git from SVN - [Overview](https://www.atlassian.com/git/tutorials/migrating-overview) - [Prepare](https://www.atlassian.com/git/tutorials/migrating-prepare) - [Convert](https://www.atlassian.com/git/tutorials/migrating-convert) - [Synchronize](https://www.atlassian.com/git/tutorials/migrating-synchronize) - [Share](https://www.atlassian.com/git/tutorials/migrating-share) - [Migrate](https://www.atlassian.com/git/tutorials/migrating-migrate) - [Perforce to Git - why to make the move](https://www.atlassian.com/git/tutorials/perforce-git) - [Migrating from Perforce to Git](https://www.atlassian.com/git/tutorials/perforce-git-migration) - [Working with Git and Perforce: integration workflow](https://www.atlassian.com/git/tutorials/git-p4) - [How to move a Git repository with history](https://www.atlassian.com/git/tutorials/git-move-repository) - Advanced Tips - [Overview](https://www.atlassian.com/git/tutorials/advanced-overview) - [Merging vs. Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) - [Reset, Checkout, and Revert](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) - [Advanced Git log](https://www.atlassian.com/git/tutorials/git-log) - [Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks) - [Refs and the Reflog](https://www.atlassian.com/git/tutorials/refs-and-the-reflog) - [Git submodules](https://www.atlassian.com/git/tutorials/git-submodule) - [Git subtree](https://www.atlassian.com/git/tutorials/git-subtree) - [Large repositories in Git](https://www.atlassian.com/git/tutorials/big-repositories) - [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs) - [Git gc](https://www.atlassian.com/git/tutorials/git-gc) - [Git prune](https://www.atlassian.com/git/tutorials/git-prune) - [Git bash](https://www.atlassian.com/git/tutorials/git-bash) - [How to store dotfiles](https://www.atlassian.com/git/tutorials/dotfiles) - [Git cherry pick](https://www.atlassian.com/git/tutorials/cherry-pick) - [GitK](https://www.atlassian.com/git/tutorials/gitk) - [Git-show](https://www.atlassian.com/git/tutorials/git-show) - Articles - [Dealing with Maven dependencies when switching to Git](https://www.atlassian.com/git/articles/maven-dependencies-versions-merging) - [Pull request proficiency: Fetching abilities unlocked\!](https://www.atlassian.com/git/articles/pull-request-proficiency-fetching-abilities-unlocked) - [Git and project dependencies](https://www.atlassian.com/git/articles/git-and-project-dependencies) - [Git or SVN? How Nuance Healthcare Chose a Git Branching Model](https://www.atlassian.com/git/articles/git-or-svn-git-branching-model) - [Git Forks And Upstreams: How-to and a cool tip](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) - [Core concept, workflows and tips](https://www.atlassian.com/git/articles/core-concept-workflows-and-tips) # Git revert The `git revert` command can be considered an 'undo' type command, however, it is not a traditional undo operation. Instead of removing the commit from the project history, it figures out how to invert the changes introduced by the commit and appends a new commit with the resulting inverse content. This prevents Git from losing history, which is important for the integrity of your revision history and for reliable collaboration. Reverting should be used when you want to apply the inverse of a commit from your project history. This can be useful, for example, if you’re tracking down a bug and find that it was introduced by a single commit. Instead of manually going in, fixing it, and committing a new snapshot, you can use `git revert` to automatically do all of this for you. ## How it works The `git revert` command is used for undoing changes to a repository's commit history. Other 'undo' commands like, [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) and [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/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 to this commit. A revert operation will take the specified commit, inverse the changes from that commit, and create a new "revert commit". The ref pointers are then updated to point at the new revert commit making it the tip of the branch. To demonstrate let’s create an example repo using the command line examples below: ``` 1$ mkdir git_revert_test 2$ cd git_revert_test/ 3$ git init . 4Initialized empty Git repository in /git_revert_test/.git/ 5$ touch demo_file 6$ git add demo_file 7$ git commit -am"initial commit" 8[main (root-commit) 299b15f] initial commit 9 1 file changed, 0 insertions(+), 0 deletions(-) 10 create mode 100644 demo_file 11$ echo "initial content" >> demo_file 12$ git commit -am"add new content to demo file" 13[main 3602d88] add new content to demo file 14n 1 file changed, 1 insertion(+) 15$ echo "prepended line content" >> demo_file 16$ git commit -am"prepend content to demo file" 17[main 86bb32e] prepend content to demo file 18 1 file changed, 1 insertion(+) 19$ git log --oneline 2086bb32e prepend content to demo file 213602d88 add new content to demo file 22299b15f initial commit ``` Here we have initialized a repo in a newly created directory named `git_revert_test`. We have made 3 commits to the repo in which we have added a file `demo_file` and modified its content twice. At the end of the repo setup procedure, we invoke `git log` to display the commit history, showing a total of 3 commits. With the repo in this state, we are ready to initiate a `git revert.` ``` 1$ git revert HEAD 2[main b9cd081] Revert "prepend content to demo file" 1 file changed, 1 deletion(-) ``` `Git revert` expects a commit ref was passed in and will not execute without one. Here we have passed in the `HEAD` ref. This will revert the latest commit. This is the same behavior as if we reverted to commit `3602d8815dbfa78cd37cd4d189552764b5e96c58`. Similar to a merge, a revert will create a new commit which will open up the configured system editor prompting for a new commit message. Once a commit message has been entered and saved Git will resume operation. We can now examine the state of the repo using `git log` and see that there is a new commit added to the previous log: ``` 1$ git log --oneline 1061e79 Revert "prepend content to demo file" 86bb32e prepend content to demo file 3602d88 add new content to demo file 299b15f initial commit ``` Note that the 3rd commit is still in the project history after the revert. Instead of deleting it, `git revert` added a new commit to undo its changes. As a result, the 2nd and 4th commits represent the exact same code base and the 3rd commit is still in our history just in case we want to go back to it down the road. ## Common options ``` 1-e 2--edit ``` This is a default option and doesn't need to be specified. This option will open the configured system editor and prompts you to edit the commit message prior to committing the revert ``` 1--no-edit ``` This is the inverse of the `-e` option. The revert will not open the editor. ``` 1-n 2--no-commit ``` Passing this option will prevent `git revert` from creating a new commit that inverses the target commit. Instead of creating the new commit this option will add the inverse changes to the Staging Index and Working Directory. These are the other trees Git uses to manage the state of the repository. For more info visit the [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) page. ## Resetting vs. reverting It's important to understand that `git revert` undoes a single commit—it does not "revert" back to the previous state of a project by removing all subsequent commits. In Git, this is actually called a reset, not a revert. ![Resetting vs reverting diagram](https://dam-cdn.atl.orangelogic.com/AssetLink/2j66ti63sp0n24s04h2i6444kmnb2ymy.svg) Reverting has two important advantages over resetting. First, it doesn’t change the project history, which makes it a “safe” operation for commits that have already been published to a shared repository. For details about why altering shared history is dangerous, please see the [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) page. Second, `git revert` is able to target an individual commit at an arbitrary point in the history, whereas `git reset` can only work backward from the current commit. For example, if you wanted to undo an old commit with `git reset`, you would have to remove all of the commits that occurred after the target commit, remove it, then re-commit all of the subsequent commits. Needless to say, this is not an elegant undo solution. For a more detailed discussion on the differences between `git revert` and other 'undo' commands see [Resetting, Checking Out and Reverting.](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) ## Summary The `git revert` command is a forward-moving undo operation that offers a safe method of undoing changes. Instead of deleting or orphaning commits in the commit history, a revert will create a new commit that inverses the changes specified. `Git revert` is a safer alternative to `git reset` in regards to losing work. To demonstrate the effects of `git revert` we leveraged other commands that have more in-depth documentation on their individual pages: [git log](https://www.atlassian.com/git/tutorials/git-log), [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit), and [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset). ## Recommended for you ### Bitbucket blog [Learn more](https://www.atlassian.com/blog/bitbucket) ### DevOps learning path [Learn more](https://university.atlassian.com/student/activity/2483065-hello-and-welcome) ### Learn more about Git Find more Git guides and resources in this hub. [Read more](https://www.atlassian.com/git) - [Company](https://www.atlassian.com/company) - [Careers](https://www.atlassian.com/company/careers) - [Events](https://www.atlassian.com/company/events) - [Blogs](https://www.atlassian.com/blog) - [Investor Relations](https://investors.atlassian.com/) - [Atlassian Foundation](https://www.atlassianfoundation.org/) - [Press kit](https://www.atlassian.com/company/news/press-kit) - [Contact us](https://www.atlassian.com/company/contact) ## Products - [Rovo](https://www.atlassian.com/rovo) - [Jira](https://www.atlassian.com/software/jira) - [Jira Align](https://www.atlassian.com/software/jira/align) - [Jira Service Management](https://www.atlassian.com/software/jira/service-management) - [Confluence](https://www.atlassian.com/software/confluence) - [Loom](https://www.atlassian.com/software/loom) - [Trello](https://trello.com/home) - [Bitbucket](https://www.atlassian.com/software/bitbucket) - [See all products](https://www.atlassian.com/software) ## Resources - [Technical support](https://support.atlassian.com/) - [Purchasing & licensing](https://www.atlassian.com/licensing/purchase-licensing) - [Atlassian Community](https://community.atlassian.com/) - [Knowledge base](https://confluence.atlassian.com/kb) - [Marketplace](https://marketplace.atlassian.com/) - [My account](https://my.atlassian.com/products/index) - [Create support ticket](https://support.atlassian.com/contact/) ## Learn - [Partners](https://www.atlassian.com/partners) - [Training & certification](https://www.atlassian.com/university) - [Documentation](https://confluence.atlassian.com/display/ALLDOC/Atlassian+Documentation) - [Developer resources](https://www.atlassian.com/developers) - [Enterprise services](https://www.atlassian.com/enterprise/services) - [See all resources](https://www.atlassian.com/resources) Copyright © 2026 Atlassian - [Privacy policy](https://www.atlassian.com/legal/privacy-policy) - [Notice at Collection](https://www.atlassian.com/legal/privacy-policy#additional-disclosures-for-ca-residents) - [Terms](https://www.atlassian.com/legal/cloud-terms-of-service) - [Impressum](https://www.atlassian.com/legal/impressum) Language selector English ▾
Readable Markdown
The `git revert` command can be considered an 'undo' type command, however, it is not a traditional undo operation. Instead of removing the commit from the project history, it figures out how to invert the changes introduced by the commit and appends a new commit with the resulting inverse content. This prevents Git from losing history, which is important for the integrity of your revision history and for reliable collaboration. Reverting should be used when you want to apply the inverse of a commit from your project history. This can be useful, for example, if you’re tracking down a bug and find that it was introduced by a single commit. Instead of manually going in, fixing it, and committing a new snapshot, you can use `git revert` to automatically do all of this for you. How it works The `git revert` command is used for undoing changes to a repository's commit history. Other 'undo' commands like, [git checkout](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) and [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/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 to this commit. A revert operation will take the specified commit, inverse the changes from that commit, and create a new "revert commit". The ref pointers are then updated to point at the new revert commit making it the tip of the branch. To demonstrate let’s create an example repo using the command line examples below: ``` $ mkdir git_revert_test $ cd git_revert_test/ $ git init . Initialized empty Git repository in /git_revert_test/.git/ $ touch demo_file $ git add demo_file $ git commit -am"initial commit" [main (root-commit) 299b15f] initial commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 demo_file $ echo "initial content" >> demo_file $ git commit -am"add new content to demo file" [main 3602d88] add new content to demo file n 1 file changed, 1 insertion(+) $ echo "prepended line content" >> demo_file $ git commit -am"prepend content to demo file" [main 86bb32e] prepend content to demo file 1 file changed, 1 insertion(+) $ git log --oneline 86bb32e prepend content to demo file 3602d88 add new content to demo file 299b15f initial commit ``` Here we have initialized a repo in a newly created directory named `git_revert_test`. We have made 3 commits to the repo in which we have added a file `demo_file` and modified its content twice. At the end of the repo setup procedure, we invoke `git log` to display the commit history, showing a total of 3 commits. With the repo in this state, we are ready to initiate a `git revert.` ``` $ git revert HEAD [main b9cd081] Revert "prepend content to demo file" 1 file changed, 1 deletion(-) ``` `Git revert` expects a commit ref was passed in and will not execute without one. Here we have passed in the `HEAD` ref. This will revert the latest commit. This is the same behavior as if we reverted to commit `3602d8815dbfa78cd37cd4d189552764b5e96c58`. Similar to a merge, a revert will create a new commit which will open up the configured system editor prompting for a new commit message. Once a commit message has been entered and saved Git will resume operation. We can now examine the state of the repo using `git log` and see that there is a new commit added to the previous log: ``` $ git log --oneline 1061e79 Revert "prepend content to demo file" 86bb32e prepend content to demo file 3602d88 add new content to demo file 299b15f initial commit ``` Note that the 3rd commit is still in the project history after the revert. Instead of deleting it, `git revert` added a new commit to undo its changes. As a result, the 2nd and 4th commits represent the exact same code base and the 3rd commit is still in our history just in case we want to go back to it down the road. Common options ``` -e --edit ``` This is a default option and doesn't need to be specified. This option will open the configured system editor and prompts you to edit the commit message prior to committing the revert ``` --no-edit ``` This is the inverse of the `-e` option. The revert will not open the editor. ``` -n --no-commit ``` Passing this option will prevent `git revert` from creating a new commit that inverses the target commit. Instead of creating the new commit this option will add the inverse changes to the Staging Index and Working Directory. These are the other trees Git uses to manage the state of the repository. For more info visit the [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) page. Resetting vs. reverting It's important to understand that `git revert` undoes a single commit—it does not "revert" back to the previous state of a project by removing all subsequent commits. In Git, this is actually called a reset, not a revert. ![Resetting vs reverting diagram](https://dam-cdn.atl.orangelogic.com/AssetLink/2j66ti63sp0n24s04h2i6444kmnb2ymy.svg) Reverting has two important advantages over resetting. First, it doesn’t change the project history, which makes it a “safe” operation for commits that have already been published to a shared repository. For details about why altering shared history is dangerous, please see the [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) page. Second, `git revert` is able to target an individual commit at an arbitrary point in the history, whereas `git reset` can only work backward from the current commit. For example, if you wanted to undo an old commit with `git reset`, you would have to remove all of the commits that occurred after the target commit, remove it, then re-commit all of the subsequent commits. Needless to say, this is not an elegant undo solution. For a more detailed discussion on the differences between `git revert` and other 'undo' commands see [Resetting, Checking Out and Reverting.](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting) Summary The `git revert` command is a forward-moving undo operation that offers a safe method of undoing changes. Instead of deleting or orphaning commits in the commit history, a revert will create a new commit that inverses the changes specified. `Git revert` is a safer alternative to `git reset` in regards to losing work. To demonstrate the effects of `git revert` we leveraged other commands that have more in-depth documentation on their individual pages: [git log](https://www.atlassian.com/git/tutorials/git-log), [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit), and [git reset](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset).
Shard44 (laksa)
Root Hash11161217235333269644
Unparsed URLcom,atlassian!www,/git/tutorials/undoing-changes/git-revert s443