-1
  1. I've been working on a repository for the past week, but could not push for technical reasons.
  2. I did my commits,
  3. Friday, my computer decided to freeze and never reboot again. But i never had the chance to push.

The question is:

  • Is there a way i could pull those commits, from a dead computer to the new one? Does Git store those somewhere? Even if i did NOT PUSHED?

I can't seem to find any trace of the commits, i've looked up on Bitbucket and Sourcetree.

EDIT :

Impossible.

  • 2
    They're stored in files on that computer. You don't necessarily need the whole computer to get to the files, but you will need whatever storage medium you were using, to work. – torek Jan 22 '18 at 21:06
  • hook your hdd/sdd upto another PC and brows your folders. – ZF007 Jan 22 '18 at 21:12
  • The computer has already been sent to factory for repair.. But thank you, nice advice indeed. – Cryptomothy Jan 22 '18 at 21:19

1 Answers1

2

All the commits that a given repository knows about are stored in the .git folder in the repo's local working directory. If the dead system's hard drive is still functional, and if you can connect to it from a working system, and if you can get to the working directory, then your commits will still be there.

Git hosts have no way of knowing about commits that haven't been pushed, though, so until you can push those commits there's no way to see them in Bitbucket (or any other git host).

Jim Redmond
  • 4,139
  • 1
  • 14
  • 18