let say there are 2 authors, red and blue, I have this git log
file
git log --oneline
a123bc Red
a123bd Red
a123be Red
a123bf Blue
a123bg Red
There are 5 logs, I want to squash the commits made by red into 1 commit. but I don’t want to touch blue one.
so I git rebase -i HEAD~4
I sqaush the 3 commits and pick the 1 commit that i want. s === squash, p === pick
s a123bc Red
s a123bd Red
s a123be Red
? a123bf Blue <== I don't know what to do here
p a123bg Red
What should i choose for the blue author commit? I want to leave blue commits and merge all the changes I made into my own commit. The one I choose p
for
Should I pick the blue one? I think all the changes I made in squashes commits will goes into blue one if I also pick blue one.
Can someone suggest me a solution.
Kerry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.