L
L
Leonid2016-12-02 10:20:28
git
Leonid, 2016-12-02 10:20:28

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

4 answer(s)
A
aol-nnov, 2016-12-02
@stilet69

git bisect is just for that!

W
wazza, 2016-12-02
@wazza

You can view all of your commits individually using the command
If you find a bug, fix it in a new commit.

M
mistergonza, 2016-12-02
@mistergonza

You need to create a separate branch.
And then use:
Running through the commits from top to bottom.

A
abcd0x00, 2016-12-04
@abcd0x00

Prompt - I have about 15 commits. Somewhere I made a mistake.

Bugs are usually found by
showing the corresponding commit for each line in the file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question