E
E
eugenero2015-05-29 22:55:55
git
eugenero, 2015-05-29 22:55:55

Git: how to export commits?

Hey!
I want to correct the consequences of my crooked hands.
There is a turnip with N branches. Development velast in all branches and from time to time merged together. However, instead of merging, I shoved and pulled. As a result, the development history looks crappy. If you look at gitk, then instead of beautiful branches and horizontal links between them, there is some kind of spaghetti. Can this be fixed? Let's say, somehow export all the commits, starting with the first one, and then manually roll them in order, diluting them with merges. There are only 20 commits, it shouldn't be hard. Tell me the recipe?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-05-30
@eugenero

There are many tools in the git for this... the most correct one, perhaps, is
Either make a branch from one of the initial commits, when everything was still good, and gradually merge into it the commits from the "dirty" one with the key --squash. Or cherry pick .
Either generate patches
then apply
git am < file.patch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question