R
R
Romi2021-10-23 11:44:26
git
Romi, 2021-10-23 11:44:26

Is it possible to somehow “cleanse” the branch of unnecessary intermediate commits?

In the course of development, I sometimes make a lot of intermediate commits, which I would later like to delete when publishing a branch so that it reads better, and who cares what kind of darkness my mind wandered while I was writing the code :

D leave only key commits in the branch that can really be useful in the future.

What is the best way to do this? From the terminal, or better - from VSC.

How is such a process generally called (if it is called at all, of course, but I think that I'm not the only one)))

I.e. can you "merge" commits? Or do something else with them so that they become smaller, and the final state remains the same.

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-10-23
@romicohen

squash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question