Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

I did a 'Reset to Commit' On soft Setting and it has taken my local working copy.

I was committing a big update (15 hours of work) and when i went to push (after i had committed and staged my files)

It told me one of my files was 1gb and cant be pushed (due to the 100mb maximum) 

So i used a reset to commit, on soft, so that i could re-commit and push my changes without, that massive files. 
After the reset said it was complete, My working copy (that i was about to commit) has disappeared and I am left with the version of it that is the old version and cannot find my files i was going to add.. How can I get them back? 

I need them.

The log says this : 
commit: # Major Update
1b8d17b92ccadc41aaa3995447ae550e8e52b947 4cada132357fd6af4bdf6d817cd5ae439dbc042e DevelopdProgramming <> 1581838868 +1000 pull origin master: Merge made by the 'recursive' strategy.
4cada132357fd6af4bdf6d817cd5ae439dbc042e 1f8133c1b507a720f043c377d1987a4448ea80a2 DevelopdProgramming <> 1581839264 +1000 revert: Revert "# Major Update"
1f8133c1b507a720f043c377d1987a4448ea80a2 fefddde1f72fd2d894e0da06f7c0f00715d02dda DevelopdProgramming <> 1581839331 +1000 reset: moving to fefddde1f72fd2d894e0da06f7c0f00715d02dda

If you know anything that may help please answer ASAP,

1 answer

1 accepted

0 votes
Answer accepted

As an answer to this question - Open terminal 

and use git reflog

Then find the HEAD{1,2,3,4 ect.} that is before your revert. 

and do a git reset 'HEAD@{your number)

from there put in git status, and it should pop up with a  bunch of files that were deleted/modified.. if it doesn't repeat the first steps above again till it does (with a different or the same number, just find the same text for the commit before the revert)

then once it does pop up with the list of deleted/modified files, 

put in git stash 


and you will have it all back!

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,249 views 5 14
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