E
E
enGuardian2016-03-29 01:11:36
git
enGuardian, 2016-03-29 01:11:36

What's the correct way to delete a web of old commits?

Introductory data: there is a repository, master and devel permanent branches, a team of programmers and a bunch of feature branches from each. Before the release, the features are grouped into devel, the integration problems of different features are corrected, and the result goes to master. In general, everything is as usual.
Problem: if merge --no-ff is used when merging, everything looks nice, but deleting a branch does not delete intermediate commits. It means that a graphical tool like gitg displays them, it's understandable, the story is as it is. But over time, the repository looks like a tangled web. And removing the branches leaves this web as is.
Another way is the --squash option which squashes the branch to a single commit and puts it where asked. After that, you can delete the branch with the -D switch and everything will be clean. But this operation makes the author of all edits the one who squashed, and not the one who grew the branch. And it is also misleading - on the graph, the branch looks like it has not been merged.
What you need is beauty on the graph as with --no-ff and flattening when deleting a branch.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
enGuardian, 2016-03-29
@enGuardian

Colleagues, I see that the solution lies not in the area of ​​git, but in the area of ​​building processes and implementing rules. Thanks to all.

I
Ivan Filatov, 2016-03-29
@NYMEZIDE

I don't see a problem with branch history and commits.
The Feature_ branches themselves are removed, but the history remains. She doesn't interfere.

A
aol-nnov, 2016-03-29
@aol-nnov

Feature branch->work->rebase to mainline (if necessary), squash up to one commit (by author)->codevreview, check for compilability->automatically merge to mainline (if there are enough votes. Otherwise, repeat).
That's how we live. Everyone is happy :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question