Skip to content

Instantly share code, notes, and snippets.

@zthxxx
Last active January 16, 2021 15:41
Show Gist options
  • Save zthxxx/eeadc3ddda213c6650d23435e460dc34 to your computer and use it in GitHub Desktop.
Save zthxxx/eeadc3ddda213c6650d23435e460dc34 to your computer and use it in GitHub Desktop.
# find merge-request which contains commit in GitLab
# https://gitlab.com/gitlab-org/gitlab-foss/-/issues/28037
# https://stackoverflow.com/a/17819027/7277090
git config --add remote.origin.fetch '+refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*'
git fetch origin
git for-each-ref --contains <hash> | grep merge-requests | head -n 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment