Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Did I just delete a whole month of work?

Tags:

git

I'am a Git noob and I'am actually only using it to save files to Bitbucket. Git was complaining that everything was up-to-date and because it's late and I want to go sleep I just hammered some commands from Stackoverflow and I did a git reset --hard without a succesful commit or push and now 30 days of work are gone o__O

Here's what I did:

$ git add .
$ git commit -m "I can see light"
*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'cc@cc-MS-7788.(none)')
$ git push origin master
Password for 'https://[email protected]': 
Everything up-to-date

Then I tried git status and saw the changes, but Git kept telling me that everthing is up-to-date.

So I did:

$ git reset --hard
HEAD is now at f798df1 starting export fixing

And now everything is gone. I tried git reflog, but my commit isn't there. Please don't tell me that I just really deleted a month of work o__O

Please advise! Every suggestion is extremly appreciated!!!

Here is the output from git reflog. The commit isn't there. "starting export fixing" was the succesful commit on 6 June.

$ git reflog
f798df1 HEAD@{0}: checkout: moving from master to master
f798df1 HEAD@{1}: commit: starting export fixing
774c057 HEAD@{2}: commit: meeh
7a66261 HEAD@{3}: commit: finishedTaskCheckup + RunningStop Bug fixed
ca0945a HEAD@{4}: commit: hätte vorher committen sollen... static bei Parsers weggenommen
beb77f0 HEAD@{5}: commit: Version 0.1
68a8874 HEAD@{6}: commit: Updating Ubuntu... omg.. o__O
004910d HEAD@{7}: commit: Verfifiers finished
cb2da07 HEAD@{8}: commit: ConcurrentMap Problem
f0f05e6 HEAD@{9}: commit (initial): dns lookup
like image 929
Crayl Avatar asked Jan 28 '26 17:01

Crayl


1 Answers

Yes, if you went 30 days without ever committing your work, it's lost -- except, of course for your ordinary backup of the machine.

like image 166
bmargulies Avatar answered Jan 30 '26 15:01

bmargulies



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!