This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Sourcetree

How to Cancel Push in Sourcetree

Updated on:
June 5, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to undo a pushed commit in Sourcetree using force push.

Quick summary

To cancel a push in Sourcetree, you reset your current branch to an earlier commit in the History tab, then use a force push to overwrite the remote repository with the corrected state. This method effectively removes unwanted pushed commits from the remote repo without deleting local files.


Steps

  1. Go to the History tab in Sourcetree to view your commit log.
  2. Right-click the commit you want to revert to.
  3. Choose 'Reset current branch to this commit' from the context menu.
  4. In the 'Reset to Commit' window, select a reset mode (e.g. Mixed or Hard).
  5. Click 'OK' to confirm the branch reset.
  6. Click 'Push' to open the push dialog.
  7. Check the 'Force Push' option before pushing.
  8. Click 'Push' to complete the force push and remove the unwanted commits from the remote repo.

📌 Why this matters

Knowing how to cancel a push in Sourcetree is essential for developers who need to undo mistakes in a remote Git repository without using the command line. The force push workflow — resetting a branch to a previous commit and overwriting the remote — is the fastest way to reverse an accidental or incorrect push. Sourcetree's visual interface makes this otherwise complex Git operation accessible to developers of all experience levels. Mastering this process helps teams maintain a clean, accurate commit history and avoid breaking shared branches.
Your product deserves an interactive demo
Start free
Similar Articles
Sourcetree

How to Update Sourcetree Mercurial

Madhav Bhandari
Director of Marketing @ Storylane
Sourcetree

How to Add SSH Key in Sourcetree

Madhav Bhandari
Director of Marketing @ Storylane
Sourcetree

How to Change User in Sourcetree

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Hubs
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it