It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Remove Pushed File from Branch


I recently accidentally push .gitignore into my branch, but didn't want to even commit it. After floundering for a while and running a lot of sourcetree functions to try to change where my origin is, I'm still not able to reset the orgin to a version that doesn't have .gitignore pushed. I've made a pull request already to merge this branch into master, and I'm not sure if that affects how I can change the branch here. Here's a photo of what my status looks like, I'd like the origin to be reset where the bugfix is.

Screen Shot 2017-07-19 at 9.36.26 AM.png

1 answer

1 accepted

0 votes
Answer accepted
Manju Atlassian Team Jul 20, 2017

You can "Reverse" your commit and get all your changes reverted to as it were on the previous version. 

Right click on the commit row to select "Reverse commit".


I wasn't able to do that before because I had a pull request open and a merge was in progress regarding that commit. Once I closed the pull request I was able to reverse the commit.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,895 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you