Yes, that’s not quite what I’m looking for.
From the Gitlab UI (at least on my instance) I can open a MR that was merged 12 months ago (and the branch was deleted when it was merged). I can then go to the “Changes” tab, and select any of the versions of the MR. We use a rebase workflow, not a merge commit workflow, so we iterate on a merge request by rewriting history on the MR branch and then force-pushing to Gitlab. Since the new versions were created by force pushing, the old versions don’t have any refs that hold onto them. However I’m still able to see them, and their contents, in the merge request UI.
I’m looking for a way to fetch these commits, which are obviously still on the server somewhere since it is able to show them to me in the web UI.
The example I gave above is for a MR that was already merged, but I’m equally interested in accessing previous versions of MRs that are still open (so that I can compare versions myself in my local workspace, e.g. use
Not to digress, but I recently had a scenario where I was helping someone with their MR. I force-pushed a new patch series to their branch with some fixups. They then later accidentally force pushed some changes based on an old version over my new version. I was able to piece everything together using the reflog in my local client, but it would be nicer if there was a reliable way to get the commits from Gitlab itself, in case I didn’t have them in my reflog.