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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With