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 <DevelopdProgrammingOfficial@gmail.com> 1581838868 +1000 pull origin master: Merge made by the 'recursive' strategy.
4cada132357fd6af4bdf6d817cd5ae439dbc042e 1f8133c1b507a720f043c377d1987a4448ea80a2 DevelopdProgramming <DevelopdProgrammingOfficial@gmail.com> 1581839264 +1000 revert: Revert "# Major Update"
1f8133c1b507a720f043c377d1987a4448ea80a2 fefddde1f72fd2d894e0da06f7c0f00715d02dda DevelopdProgramming <DevelopdProgrammingOfficial@gmail.com> 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
TAGS
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,917 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