How can i remove detached commits from git?
I have two detached commits. How can i remove they as if they had never been?
I don’t want save history or another logs. Nothing.
One Solution collect form web for “How can i remove detached commits from git?”
Do you mean commits made while you had a detached HEAD? If so, just:
git checkout some_branch
Your commits will no longer be visible in e.g.
git log. They will be culled from storage at some point while Git runs its garbage-collection sweeps. If you want to cull things now, see answers to this question: How to remove unreferenced blobs from my git repo.