Search code examples
gitandroid-studiogithubpull-requesthttp-status-code-422

Creating GitHub pull request from Android Studio gives error


I am attempting to create a pull request from Android Studio. I have edited a file, commited the file, and then when I click Create pull request it tries to create it and I receive the error below:

Can't Create Pull Request
Can't create pull request

422 Unprocessable Entity - Validation Failed
[PullRequest; null]custom: No commits between master and master

My branches and remotes are set up correctly as far as I know. I am able to directly push as well so I know it can access GitHub.


This is what the Create pull request menu looks like:

This is what the <code>Create pull request</code> menu looks like


This is what my Git Remotes menu looks like: This is what my <code>Git Remotes</code> menu looks like


My questions is am I missing a step that I need to do before I create the pull request? If not, why am I receiving this error?


Solution

  • I have found the solution to this.

    You need to create a new branch then push the commits to that branch then create the pull request that compares the newly created branch and the master branch.