Skip to content

Instantly share code, notes, and snippets.

View annamalaiarunachalam's full-sized avatar
🏠
Working from home

Annamalai Arunachalam annamalaiarunachalam

🏠
Working from home
View GitHub Profile
@jimrubenstein
jimrubenstein / _git-objects-restore.php
Last active September 15, 2023 19:04
Restore files from .git/objects
#!/usr/local/bin/php
<?php
define('DIR', 'tree');
define('FILE', 'blob');
function main() {
$root_object = 'f3c8ec92f83e2a87c1d00a5681598126e23ab356';
restore_object($root_object, 'restored');
}