Git switch branch detached head12/13/2023 Strange enough, there is no ID starting with b36a22 in the prune listing above.Īnyhow, I'll consider the issue solved. The commit I just deleted had an ID starting with b36a22. At least, it doesn't show up in gitk anymore. Thank you for the tips Indeed, after checking out in another branch, the commit I wanted to delete is gone. Thank you for the tip However, now I see this: How do I delete that commit (and its tag) completely from the whole history? Turn off this advice by setting config variable tachedHead to false If you want to create a new branch to retain commits you create, you mayĭo so (now or later) by using -c with the switch command. State without impacting any branches by switching back to a branch. You can look around, make experimentalĬhanges and commit them, and you can discard any commits you make in this Note: switching to 'b36a22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'. Now, when I checkout into that commit (by using its SHA1 ID, which I just represent here ending in 'XXXX' for safety reasons), this is what I get: >git checkout b36a22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX I tried a few things, but it only got worse. It was a mistake, and I simply want to delete that commit and its tag alltogether. When running gitk, I can see the following:Īs you can see, there is a commit (already pushed remotely) at the top, with a tag v0.5.11. I have a git repo with two branches: kristof (my name) and master.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |