Skip to content

Instantly share code, notes, and snippets.

@uniomni
Created January 31, 2011 06:42
Show Gist options
  • Save uniomni/803722 to your computer and use it in GitHub Desktop.
Save uniomni/803722 to your computer and use it in GitHub Desktop.
Recovering from (no branch) condition in submodule
From: http://superuser.com/questions/116153/rescuing-files-and-commits-from-no-branch-in-git
$ cd submodule_dir
$ git reflog # Find the commit
$ git checkout master
# SHA_OF_MISSING_COMMIT
$ git cherry-pick 404c584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment