I recently screwed up my git repo and would like to find out if there is any remedy to it.
My setup is this:
Central repo on github.
Personal repo on
What exactly do you mean by
I messed [up] my master and can no longer branch from it.
You can always create a new branch from any commit in your repository, no matter how “messed up” it may be–which by the way is something Git has no notion of.
Basically you can revert your repository to any state it previously had because Git will not explicitely delete any objects, it will only garbage collect unreferenced (dangling) objects every now and then. So you just need to find out what your repository looked like. gitk
or git log
can help you there.
After you restored your local repository to a state you like you can simply push it back to your central public repository. If that results in a non-fast-forward push you might need to specify the --force
flag when pushing.