Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining why github says "Closed with unmerged commits"

I sometimes contribute pull requests to an upstream repo. Someone applies my pr to master and closes it. Then github says "Closed with unmerged commits". Why?

What I want to figure out what, if any, code edits I made on the branch that I created the pr from that did not get included (applied or ~merged) into the upstream repo's mater branch. I don't want to perform "manual inspection" and instead want one, or several, cli git commands that will show me exactly what those code edits are.

like image 680
Björn Lindqvist Avatar asked Dec 03 '13 14:12

Björn Lindqvist


People also ask

What are unmerged commits?

git-unmerged is a tool that helps you find commits that have not been merged into an upstream branch like master or origin/master. It displays useful information in color to make it easy to identify the missing commits. To make it easier on us, it provides a brief overview, a legend, and a breakdown of each branch.

How do you check if a pull request is merged?

Pull requests are closed automatically whenever the maintainer merge the changes through the web interface. If he merged using the command line, it will be closed as soon as he pushes the code back to Github. So if a PR is still open, it means it is not merged.

What does it mean when a pull request is merged?

A pull request – also referred to as a merge request – is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository.


1 Answers

This just happened for me on GitHub and I have found another reason, besides the one mentioned by @twalberg in comments:

  1. They could have created a patch from your forked repository and applied it. This is with the help of format-patch command:

    $ git format-patch branch --stdout > file.patch

  2. (stated by @twalberg in comments) They could have used cherry-pick, which applies changes in a single commit.

These actions make sense for small changes when merging from a branch (in-case the patch is in separate branch on forked repository) or rebasing isn't needed.

like image 151
phoops Avatar answered Sep 17 '22 18:09

phoops