1
0
Fork 0
mirror of https://github.com/vbatts/freezing-octo-hipster.git synced 2024-12-22 19:56:30 +00:00
random-utils/cmd/see-pr
Vincent Batts 4801e055ca
cmd/see-pr: module updates
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-04-26 16:25:44 -04:00
..
go.mod cmd/see-pr: module updates 2023-04-26 16:25:44 -04:00
go.sum cmd/see-pr: module updates 2023-04-26 16:25:44 -04:00
main.go see-pr: to add the github PR pull refspec 2020-05-20 17:58:47 -04:00
README.md see-pr: update README 2020-05-22 10:23:06 -04:00

see-pr

I personally like fetching the pull-request's of a project. Makes it easier tig pr/1234, build it, etc.

This tool simply adds the github PR refspec to a local git repo.

cd $YourClonedRepo
see-pr
git fetch
git checkout pr/1234

Install

go get github.com/vbatts/utils/cmd/see-pr

Usage

$ see-pr -h
Usage of see-pr:
  -config string
        path to the git config (default ".git/config")
  -path string
        local path of the git repo (default ".")
  -remote string
        upstream remote name (default "origin")

Then to let it update your .git/config:

$ see-pr
INFO[0000] reading from ".git/config"                   
INFO[0000] origin/origin URL: git@github.com:vbatts/utils.git 
INFO[0000] appending fetch = +refs/pull/*/head:refs/remotes/pr/* 
INFO[0000] SUCCESS! `git fetch` and then you can `git checkout pr/$NUM` of your PRs