“Redefinir Git Último Commit” Respostas de código

Desfazer compromisso

# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
Lively Leopard

git cancelar o último compromisso

git reset --soft HEAD~1
Lucky Lapwing

desfazer o último compromisso

#this  will preserve changes done to your files
git reset --soft HEAD~1

#this will get rid of the commit and the changes done to the files
$ git reset --hard HEAD~1
 
Old-fashioned Oyster

Git desfazer a última confirmação

# Undo last commit.
# --soft flag makes sure that the changes in undone revisions are preserved.
# You'll find the changes as uncommitted local modifications in your working copy.
git reset --soft HEAD~1

# If you don't want to keep these changes, simply use the --hard flag.
# This will completely remove the changes.
git reset --hard HEAD~1
Yingfufu

Redefinir Git Último Commit

$ git reset --soft HEAD~1
Brainy Butterfly

Remova o último commit Git

git reset --hard HEAD^
git push origin -f
Cruel Cod

Respostas semelhantes a “Redefinir Git Último Commit”

Perguntas semelhantes a “Redefinir Git Último Commit”

Mais respostas relacionadas para “Redefinir Git Último Commit” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código