This is already regularly done. One side or the other will propose or amend a bill that they claim does [popular thing x] and then add in some clause that they know will get voted against, so they can then claim that [other side] voted against [popular thing x].
This is often especially cynical because [popular thing x] is often something that neither party wants to pass. So a very recent example of this was an act against insider trading by politicians, that was bundled with a voter id law. Neither side wants to clamp down on insider trading from politicians, so the entire act was DOA. It was nothing but bread and circuses.
Git does allow multiple contributors on each commit. Of course people can lie, but it's a matter of policy in the end. Make it a crime to not add all contributors to a diff.
The politicians wouldn’t have the option to game it if additional data is pulled in automatically like lobbying disclosure filings, public watchdog databases, etc. for the final overview. A swift turn from limiting the total sugar amount in soda would look quite bad if the politician got lobbied by Big Soda.
Every system gets gamed, and so is the current one. The goal is that the people can more easily stay informed. Even with mixed authors problem you highlight would be still an improvement.
Insert language you know will never get enough votes
Don’t strike out but add language to make it useless
Plus the bill sponsor often makes changes others ask for, so the true author isn’t noted
It would be a mess and ignored by the public after a while