Answer the question
In order to leave comments, you need to log in
How to remove one of several commits that are not yet pushed (push)?
Hello! Tell me, for example, I made 2 commits and have not done push yet. How do I remove a commit that was earlier.
8f2ab50 (HEAD -> master) first style
473c2b5 777
db7c3b6 (origin/master) 111
755b1f3 добавил файл file.txt
0143f76 Пятый коммит измененный
3e1e7e2 Четвертый коммит
eb7064c Третий коммит
e2141f2 rename
9516968 first commit
reset --soft 473c2b5
и потом reset --hard HEAD~1
но самый верхний коммит пропадает, а файлы относяциеся к нему возвращаются в отредактированное, но не сохраненное состояние.Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question