Can I delete a git commit but keep the changes?

It’s as simple as this: Note: some shells treat ^ as a special character (for example some Windows shells or ZSH with globbing enabled), so you may have to quote “HEAD^” or use HEAD~1 in those cases. git reset without a –hard or –soft moves your HEAD to point to the specified commit, without changing any files. HEAD^ refers to the (first) parent commit of your current commit, which in your … Read more

How to uncommit my last commit in Git [duplicate]

If you aren’t totally sure what you mean by “uncommit” and don’t know if you want to use git reset, please see “Revert to a previous Git commit”. If you’re trying to understand git reset better, please see “Can you explain what “git reset” does in plain English?”. If you know you want to use git reset, it still … Read more