Tenía una web hecha y quería añadirla a git.
El caso es que hice git init
, git remote add origin ...
, git add -A
y me di cuenta que tenía node_modules añadido, con lo que quise deshacer el git add
para añadir un .gitignore
pero para esto hice un git reset --hard
asi que ahora no veo ningún archivo de la web. ¿Habría alguna forma de restaurar el git reset --hard
para dejarlo todo como estaba?
Si hago git fsck --lost-found
obtengo esto:
notice: HEAD points to an unborn branch (master)
Checking object directories: 100% (256/256), done.
notice: No default references
missing tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
dangling blob ce013625030ba8dba906f756967f9e9ca394464a
He hecho un git checkout 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -- .
pero me tira esto:
error: pathspec './' did not match any file(s) known to git.