Is git reset --hard <ref> safe in detached head -


is safe git reset --hard <ref> in detached head mode (not considering uncommited changes)? afaik, point head ref , checking out index , working tree, git checkout <commit> would, , same sandbox thing still applies. correct? there no danger, long no branch tip moved, right? , wouldn't happen in detached head mode?

if have detached head head moved <ref>. if have branch checked out moves branch state well.

one thing note no commits deleted, may no longer visible normal git log command - unless git gc --prune (git clean) or still able commits started @ before reset command issued commands git fsck --lost-found , git log --walk-reflogs --oneline --decorate... i.e. git never deletes unless force to.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -