Difference between pull request and branch merge(as pull request)

How does git differenciates a pull request and a branch merge which is raised as a pull request and provide a defaults message like:

  1. For branch merge --> Merge branch ‘release_6.1’
  2. For pull request    --> Merge pull request #1119 from “user_repo/release_6.1”

I’m not sure I understand the question you’re asking. Git itself doesn’t have a concept of pull requests, so what you’re describing are the subject lines of the commit messages that are created by Git or GitHub for certain actions. Here are two examples from https://github.com/atom/atom which I obtained with the command line git log -m -S'branch' --format="%h %s":

7f5a7c9b9 Merge branch 'master' into electron-2.0
5af2ea9e1 Merge pull request #17284 from atom/weekly-focus-2018-05-07

The first one (7f5a7c9b9) is the default commit message that Git generates when merging one branch into another using the git merge command. In this case it was merging the latest master branch changes into a feature branch for migrating Atom to Electron v2.0.

The second one (5af2ea9e1) is the commit message that GitHub generates when merging a pull request. In this case, merging PR atom/atom#17284.

These are just conventions that are followed by the respective tools when certain actions are taken, not something that GitHub has to “differentiate” after the fact.

I hope that helps!