Recover staged files after git reset –hard

Ok you want to get rid off of your unstaged file in a git repo.

Nice:

git add .  
git reset --hard

But wait…what?…no!!! Some of the unstaged files were actually necessary! They had to be in .gitignore! What about now?!

Don’t despair and type:

git fsck --lost-found

Now you can go in the newly created directory .git/lost-found/other/ and find all the files that were deleted by the destructive git reset --hard.

The only problem is that their original names aren’t retained 🙁

Anyway if you remember the content of the files that should be actually retained you can check manually each one of those in .git/lost-found/other/ and copy them back in their original location.

PrestaShop is on GitHub! Contribute!

Don’t you know PrestaShop (PS)?
Take a look here 🙂

It’s a modular system that let you create a rich e-commerce platform by supporting a vast number of different features. These features are implemented via modules that hooks right into the core of PS.

There are a lot of modules, free and not, and the community is pretty active. Some of them are released together with PS and are directly developed by the PS group.

However some of them are limited (e.g. Cash On Delivery) and so…developers to the rescue!

There are a lot of custom modules posted in the PS dedicated forum section but actually you can also directly fork PS from GitHub, develop your changes to the core modules, and then ask a pull request.

Here’s an example of the over mentioned Cash On Delivery module enriched with the possibility to add a custom fee.
I’ve added this feature too and published the modified version of the module on GitHub. Actually I didn’t fork the entire PS repo but I’ve just created one with only my module.