I am somewhat of a newbie with git and was frustrated with how my repo was working.. or in this case not working.. so I deleted it off of git hub, deleted the git folder on the project and was planning to start fresh.
Now when i try and set up a fresh repo I am getting a lot of messages like :
warning: You appear to be on a branch yet to be born.
warning. Forcing checkout of HEAD
when I try and run the first commit I see :
error: invalid object 8bcb4b5fd612e3ad55fb07e4bed087c55afd0861
fatal: git-write-tree: error building trees
I ran git fsck and see that I am missing a bunch of blobs.
How can I just wipe the slate clean and try again?
Ok,
Note the
clean
step that prevents a lot of previously untracked stuff from being added to the new repo. A good .gitignore goes a long way to prevent effects like that.If you want, you can manually migrate some/all of the old configuration, like
(or simply copy it)
I'll not go into obvious details about impact on potential remote clones/branches :)
There are ways to reconcile things like that, but for now, this seems to answer your question.