R
R
rm root2020-08-13 16:59:27
git
rm root, 2020-08-13 16:59:27

How to remove the history of the last 5 commits?

How to remove the history of the last 5 commits?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lesha, 2020-08-13
@rm_root

git reflog
The output will be something like

dbb617a (HEAD -> master, origin/master) [email protected]{0}: commit:
1ca5b87 [email protected]{1}: commit:
1019604 [email protected]{2}: commit: 
1ca5b87 [email protected]{3}: commit:
d12b1cc [email protected]{4}: commit:
a3ac3cd [email protected]{5}: commit:
d12b1cc [email protected]{6}: commit:
dfeec8b [email protected]{7}: commit:
771269e [email protected]{8}: commit:
d5abae5 [email protected]{9}: commit: 
33ec341 [email protected]{10}: commit:

Choose the desired index and roll back:
git reset [email protected]{index}
https://ohshitgit.com/ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question