Answer the question
In order to leave comments, you need to log in
How to navigate through git commits without losing them?
Hello!
Prompt - I have about 15 commits. Somewhere I made a mistake. How to sequentially go through earlier commits without losing the later ones? I tried git log, then git checkout for an early commit, but later ones are lost, in which there is a lot of necessary work
Answer the question
In order to leave comments, you need to log in
You can view all of your commits individually using the command
If you find a bug, fix it in a new commit.
You need to create a separate branch.
And then use:
Running through the commits from top to bottom.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question