|
|
|
|
|
by cfors
2099 days ago
|
|
It's not a replacement for git, its to interact with the GitHub UI over the command line. There are 3 main commands from the CLI you can issue: gh
CORE COMMANDS
issue: Create and view issues
pr: Create, view, and checkout pull requests
repo: Create, clone, fork, and view repositories
I still use the git cli and the github UI, but sometimes just view open PR's from the my terminal if I'm already in there. |
|
Some commands seem to be purely github related, which make sense, some others seem to overlap with just plain git.
> Clone the repository you want to work with using gh repo clone owner/repo
Like, what does this do apart from a regular git clone? Why is this necessary? I guess it additionally stores some meta information so that other "gh" commands know which repo they are on. This should have been a separate command IMHO to leave the regular git clone alone. Something like "git clone ssh://github.com/foo/bar" followed by "gh init foo/bar".
> When you’ve finished adding that feature or fixing that bug, use gh pr create
Same goes here. Why overlaying git commands? I would have expected to just push my branch, and then call something like "gh pr create <my branch> <target branch>"
> And your teammate can check out your pull request using gh pr checkout 1337
Same remark again and again, what does that do apart from checking out a branch? Why the overlay?
> view the diff with gh pr diff
So what's wrong with "git diff <target>..<source>"
> gh pr merge
Come on.. "git co <target> ; git merge <source>" needs to be overplayed?
> gh release create [tag name]
Oh sure, let's overlay git flow as well.
I mean overall the tool looks cute and all, but magic overlays is a no no for me.