git Command-Line

Here’s a super quick one-liner to copy the current branch’s PR URL to your clipboard (for posting into Slack, tickets, etc.)

$ gh pr view --json url --jq .url | <pbcopy | xclip -sel c>

Remember to replace the copy command with your platform’s specific command.

This would also make a good shell alias.

Also, also, I might try setting up Clipboard for multi-platform goodness.

Happy PR-ing!

– Chris

Image

Christopher R Marshall

@codegoalie

Enjoys programming web applications; especially in Go and Ruby. Also enjoys playing ice hockey as a goalie and playing the guitar.

Categories