Live data from Hacker News

GitHub CLI 1.0

github.blog

91–100 of 221 posts

Re: GitHub CLI 1.0

#91

Earlier quoted context omitted.

It's worth installing the CLI just for a single command: `gh pr create --web` Saves me having to push my current branch, navigate to the repo page, hit the "create PR" button, etc.

This is one of my favourites, too! And combined with the alias functionality, you can do gh alias set pcw 'pr create --web' and then just use gh pcw to create a new PR. There's also sufficient smarts around forking or not, depending on write permissions on the upstream repo.

Do you run this command frequently enough to do an alias? I feel like it'd be better to just have the muscle memory of typing the actual command instead

Re: GitHub CLI 1.0

#93
post #85

All of GH improvements have become irrelevant for me since they vanished one of our repos. No notification, no warning, no recourse. Just gonsky. It was just a simple library we wrote to talk to a public IP2Country REST service. Pushed to GitLab, end of.

k.

Clearly not that irrelevant if you're in here commenting.

Re: GitHub CLI 1.0

#94
post #87

GitHub is killing it with these features. I wonder how long Azure Repos will survive on it's own.

Never heard of Azure Repos before. Do they have any unique features that could be merged into Github?

I believe that Actions was a port from Azure DevOps (https://azure.microsoft.com/en-us/services/devops/?nav=min) so it does seem the teams are working together to improve the products.

Re: GitHub CLI 1.0

#95
post #6

I don't understand the appeal of using a cli to manage commits, branches, remotes, merges with conflicts, and so on. To me all these things are so much better internalized and understood when presented visually. Git GUIs are aplenty (Sublime Merge being my latest discovery, SourceTree before that) and generally really good. Combined with the already amazing GitHub web GUI, it's a wonder what use case is better served…

Probably because the GUIs are always missing something.

today I wanted to see the commit history and changes of a single file. I tried for 20 minutes to figure how to do that in sublime merge some of that searching online. Failed. Used the command line like I probably should have in the first place.

Re: GitHub CLI 1.0

#96
post #42
post #5

Earlier quoted context omitted.

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.

Honestly the doc make it pretty unclear. 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.…

Convenience.

> Like, what does this do apart from a regular git clone? Why is this necessary?

You can't see a difference between ```gh repo clone owner/repo``` and ```git clone git@github.com:owner/repo.git```?

Also:

> Something like "git clone ssh://github.com/foo/bar" followed by "gh init foo/bar"

What's there to "init"?

> Same goes here. Why overlaying git commands? I would have expected to just push my branch, and then call something like "gh pr create "

From the docs: "When the current branch isn’t fully pushed to a git remote, a prompt will ask where to push the branch [...]"

> Same remark again and again, what does that do apart from checking out a branch? Why the overlay?

It resolves the pr # to the corresponding branch name, probably git fetch and checkout. Why should I have to know the irrelevant piece of information that is how you named your branch?

> So what's wrong with "git diff .."

How do you find out the target and source hashes? Another piece of convenience.

> Come on.. "git co ; git merge " needs to be overplayed?

And this is wrong. This merges source in target locally, ```gh pr merge``` merges it remotely. You can be Linus Torvalds, you are not going to push to my master branch.

Re: GitHub CLI 1.0

#97
post #93
post #85

All of GH improvements have become irrelevant for me since they vanished one of our repos. No notification, no warning, no recourse. Just gonsky. It was just a simple library we wrote to talk to a public IP2Country REST service. Pushed to GitLab, end of.

k. Clearly not that irrelevant if you're in here commenting.

Should qualify that. I never said it doesn't sadden me to miss out on cool things. But professionally they are indeed irrelevant.

Re: GitHub CLI 1.0

#99
post #85

All of GH improvements have become irrelevant for me since they vanished one of our repos. No notification, no warning, no recourse. Just gonsky. It was just a simple library we wrote to talk to a public IP2Country REST service. Pushed to GitLab, end of.

I find in situations like these that it's pretty unlikely that the person telling the story really has no idea why something bad happened to them.

Re: GitHub CLI 1.0

#100
post #6

I don't understand the appeal of using a cli to manage commits, branches, remotes, merges with conflicts, and so on. To me all these things are so much better internalized and understood when presented visually. Git GUIs are aplenty (Sublime Merge being my latest discovery, SourceTree before that) and generally really good. Combined with the already amazing GitHub web GUI, it's a wonder what use case is better served…

It's worth installing the CLI just for a single command: `gh pr create --web` Saves me having to push my current branch, navigate to the repo page, hit the "create PR" button, etc.

[deleted]
Post reply on HN