AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Github cli repo10/30/2023 As the desktop repo states, “GitHub Desktop is not a replacement for the functionality of Git, but a tool to enable you and your team to be more productive.” ↩︎ That is, to understand git properly, and solve more complex issues, it’s better to use the command line. I admit this may be a very personal choice, and I have an opinionated… opinion. GitHub CLI is a simple, easy-to-use tool that’s also easy to love.īe sure to check out the docs, as there are a lot of useful options. git repo url syntax or visiting the repo and clicking clone. Not something I do on a daily basis, but I might even get to using it! On the other hand, gh repo clone some-org/some-other-repo is a much friendlier experience than either remembering the whole. They work very similarly to prs.Īnd, just as I was checking the docs to fact-check what I’m writing, I’ve discovered you can create a repo with gh repo create some-org/another-repo. You can list, view (open in browser) and open issues with the respective commands gh issue list, gh issue view 10, and gh issue create. So for the following output, you have to be on the same branch as the PR: $ gh pr status This is not an overview though it is branch-specific. You can check the overall PR status of a branch with gh pr status. You can also open a draft pull request by passing the -draft (or -d) flag: gh pr create -d. Depending on the task, I usually preview and request reviews, but sometimes just submit. I can also open the PR on right from the terminal (it opens the browser automatically): $ gh pr view 123 -webĬreating pull request for feat/cool-feature into master in some-org/some-repoĪfter filling title and body (the latter using your system editor ), it will give you the option to preview, submit or cancle the pull request. Your branch is up-to-date with origin/feat/cool-feature. Now comes the best part: checkout switches to the PR’s branch based on PR number. All I need to do is choose which one I’m interested in. ![]() Gh pr list shows me all the open pull requests in the current repo. #123 Add some great feature feat/cool-feature #124 Fix nasty bug fix/nasty-bug That’s my kind of workflow! ⚡️ This is what happens in a bit more detail: $ gh pr list
0 Comments
Read More
Leave a Reply. |