So one of my colleagues attempted to merge a branch using GitHub's "merge via fast-forward" option in the web-interface, to keep the history clean from bogus merge commits (the master
branch into which they merged, had not progressed since the to-be merged feature-branch was started).
Funnily enough, this didn't work as expected: all the commits got new commit-hashes.
On closer inspection, it seems that merge-option is actually called "Rebase and Merge" and it really seems to do the equivalent of git rebase --force
, changing the Committer information (both the person who did the merge, and the time when the merge happened).
It took me quite a while to confirm my suspicion that this is indeed the case, as I couldn't make the cmdline tools to show me the difference between the original commits on the feature branch and the seemingly-identical commits (with different hashes) on the master branch.
(In the end, I found that gitk
shows both Committer and Author of a commit; in the very end I found that I can also get this information via git log --pretty=raw
)
So:
- Is there a way to do a "proper" fast-forward merge (
git rebase
without theoption) via GitHub's web-interface?--force
- If not: why? (I can see merits in accountability; e.g. it answers the question who is responsible that a given piece of code ended up in
master
)