Email or username:

Password:

Forgot your password?
Darius Kazemi

When you push a branch to Github, if that branch has 1 commit and you make a pull request, the title of the PR becomes the short description of the commit, and the body becomes the long description of the commit. I like this a lot.

Is there a way to get Github to pre-populate a new PR with all the commit descriptions in a branch with multiple commits? Right now I have to copy/paste all the commit descriptions into the PR text body manually.

3 comments
Jon Dubovsky

@darius This doesn't directly help you, but in case it helps a little: I have a script in my ~/bin that contains:

git log `git merge-base --fork-point master`..HEAD --format="format:%s%n%b"

which just prints all commit messages for the current branch. I can run it as:
glogbranch | xclip
or
glogbranch | clip (on cygwin)
to dump it into the clipboard for pastin'.

Darius Kazemi

@jond ah nice! the pretty printing will be helpful

Darius Kazemi

@jond oh wow here's some magic that fixes my issue (which is that I am doing my dev via ssh on another machine)

stackoverflow.com/a/6629316/48

Instead of piping to `xclip` I can pipe to `ssh myLocalMachine pbcopy`, like:

glogbranch | ssh myLocalMachine pbcopy

This works since my local machine is a mac that uses pbcopy to do clipboard stuff. Amazing.

Go Up