git - Force remove all commits ahead of HEAD? -


I have made a mistake in my GIT repo before, merging and adding tags and liking it. I have now reset my development branch to commit (in a bold), but still there is a mess in history ahead of that commitment:

How do I get rid of those commitments (where branches split on 487ff69 for the first time) Not done? It is not necessary to be in SourceTree - the terminal commands are OK too.

Thank you!

Git tries hard to delete (with some exceptions) Which we can not pay attention to here). What do I think that you want it to be accessible , and it is quite easy, because context - mostly the branch and tag names (such as git's "hiding place" also reference We can, however, ignore it.

In this way, to make the commission accessible, we only move or delete references.

Developing your has already been moved: it now indicates the boarded commit As you wanted, you probably received a git reset or a GUI-equivalent. Unwanted commits are now referred to only 1 via the tag you added, 0.1.3 , 0.1.2 , and 0.1.1 .

So, you just delete them all Delete the tag (or stop using them), and the commitments (sounds) will disappear. (They will still be around for 90 days for a short time, others will Will be based on the statements of 30 by default for 90 days, but if you are not "designated" context in which they will go after that point; See also footer here.)

1 There is a side reference for these commands, or actually more than one through the "Rolfog" of the guitudes. Whenever git updates a reference, such as development or even the indirect "current head of the pad" reference HEAD is the name of a branch, then For that reference (if referrals are present). These are referral entries that protect the security: Each entry has a time stamp and a raw SHA-1 value, and the work to commit (or tag, if they point to the annotated tag) reference to maintain As do. Any reference to a committed will keep it, and after that parents will maintain their parents, and if so, parents will have their references to commitments, and so on. This is what makes the git so in its insistence on keeping Borg-like anything stored in the stores.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -