Modify/delete github commit

Asked 2 years ago, Updated 2 years ago, 48 views

Is there a way to modify/delete/delete the github commit?

github

2022-09-21 11:08

1 Answers

Commit cannot be modified. The English word commit itself means 'to commit', 'to do something decisively', and 'to just do it'. [em] Almost in most contexts, when something is "committed," it is never "modified." This is why the commit message should not contain typos, curses, or backbiting.

Deleting a commit is conditional, in a slightly different sense. Hard reset the head of the commit's branch to somewhere before the commit, and the commit will disappear throughout the entire flag log. (And then if you restore the changes you deleted earlier and commit them again, it will have the effect of being "modified.")

Delete all commits... Well, if you're going to do something like that, why are you wearing a collar? Just delete the entire .git hidden folder in that folder and then git init again.


2022-09-21 11:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.