Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I delete Pushes from Source Tree?

Adaryl Wakefield January 22, 2018

I got myself in some trouble here. I accidentally tried to push a big file and got an error. When I tried to reverse the commit, it just created another push. When i try to push, I blows up again. It's like there is a push log jam. How do I get rid of these unwanted pushes?

push backup.JPG

1 answer

1 vote
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2018

Hi 
The Push Indicator just reflects that your local copy of the repo is # of commits ahead of the remote.

Assuming the just want to get rid of the last 2 commits, then you can right click on 3rd from last commit and choose "Reset current branch to this commit" and then decide if you want to keep any of the changed files or not, if not select the 'Hard' reset and your local repo will return to that state, before you committed the large file.

For what its worth have you looked at Git-LFS for storing large files in Git?

Adaryl Wakefield March 30, 2018

I was finally able to test this and it worked. Thank you. I did look at Git-LFS and that didn't solve my immediate problem. Quite frankly, I don't think data files belong on GitHub at all which is what i was trying to push in the first place. There are better solutions to that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events