let's say that my colleage John has created a branch called 'john'. It has 10 committs by John. When it comes to merging back to master they ask me to do merging.
This is what I do
git checkout -b john origin/john
git rebase master
git checkout master
git merge john --squashed
git add .
git commit -m 'merged branch john'
However now what happens is that it is my id against the merged commit. And later people come asking me why did I change certain part of code.
How do I collapse all the comitts in john branch into one commit such that John is the author. I guess git commit interactive can help but could not quite understand.