问题
Is there a way to merge several commits by different authors with Git.
So that a commit is used per feature that still allows others to see who wrote the each line of code.
Will using a tool like git-flow help facilitate this ?
ie;
branch NewFeature10
- feature UI
- feature Backend
- feature Admin
- feature AdminBackend
squash and merge these commits to master so master follows
branch master
- NewFeature10
- NewFeature9
- NewFeature8
- ...
回答1:
A commit has 1 and only 1 author. The best you could achieve would be N commits for FeatureX, where N is the number of unique authors that worked on that feature.
来源:https://stackoverflow.com/questions/25796856/merge-multiple-commits-by-different-authors-while-maintaining-author-details-in