git: useful commands

-- Undo a Git merge that hasn't been pushed yet

git reset --hard HEAD~1

It will get you back 1 commit.
Any modified and uncommitted/unstashed files will be reset to their unmodified state

Comments

Popular posts from this blog

map struct :- Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

How to reset to previous commit.

Running docker as non-root user