Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view git pull requests in a local server, in command line?

I'm running a local git server, and I'm just wondering, is there a way to see all the pull-requests made by developers? Similar to Github or Bitbucket but in command line.

like image 270
Alexandru Avatar asked Oct 12 '16 11:10

Alexandru


2 Answers

This small configuration change may help you achieve what you want.

1. Add the following line to your .git/config file fetch = +refs/pull/*/head:refs/remotes/origin/pr/*

2. Fetch all pull requests using : $ git fetch origin

3. To checkout a particular PR run : $ git checkout pr/999

There is a concise guide here

like image 79
firekhaya Avatar answered Nov 15 '22 08:11

firekhaya


git-request-pull doesn't send anything. It just prints to your terminal a text, that can be e-mailed to upstream repository owner.

As written in docs:

The request, printed to the standard output, begins with the branch description, summarizes the changes and indicates from where they can be pulled.

And in Git Book:

you can run the git request-pull command and email the output to the project maintainer manually

Example from that book:

$ git request-pull origin/master myfork
The following changes since commit 1edee6b1d61823a2de3b09c160d7080b8d1b3a40:
  John Smith (1):
        added a new function

are available in the git repository at:

  git://githost/simplegit.git featureA

Jessica Smith (2):
      add limit to log function
      change log output to 30 from 25

 lib/simplegit.rb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
like image 32
Marqin Avatar answered Nov 15 '22 08:11

Marqin