I also do the same, I consider it my duty to whomever will inherit that code for future maintenance. The (final) commit messages are also as complete as possible.
The process of cleaning up a feature/topic branch into something worth of being enshrined in history is _also_ a self-review of the code. I've often found issues at that stage, and fixed them before wasting time of my peers.
I also compare the end result of the cleanup with the end result of the old mess, to ensure I did not introduce any errors in the process. Then, it is "git commit --amend -S" time (to seal the branch with a crypto signature), and ship it to review/integration (merge request).
Power management, mobile and firmware developer on Linux. Security developer at Aurora. Ex-biologist. mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer. Also on Mastodon.
Re: finish the code, and then start again with the history
Date: 2016-05-20 12:11 pm (UTC)The process of cleaning up a feature/topic branch into something worth of being enshrined in history is _also_ a self-review of the code. I've often found issues at that stage, and fixed them before wasting time of my peers.
I also compare the end result of the cleanup with the end result of the old mess, to ensure I did not introduce any errors in the process. Then, it is "git commit --amend -S" time (to seal the branch with a crypto signature), and ship it to review/integration (merge request).