An Interest In:
Web News this Week
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
You need to know about Github CLI
Hi, Devs!
What is GitHub CLI: A Command Line Interface to handle easily: repo clones, pull requests, merges, issues, gists and much others
Documentation: https://cli.github.com/manual/
Installation
//Macbrew install gh//Linuxhttps://github.com/cli/cli/blob/trunk/docs/install_linux.md
Are you going to clone a repo?
gh auth logingh repo listgh repo clone <repo_name_from_list>
Yes, you don't need to go to the Github page, all in one CLI tool you could clone a project.
Creating, deleting and configuring a repository
gh repo creategh repo create <name_of_repo> --publicgh repo create my-project --private --source=. --remote=upstreamgh repo edit --visibility <visibility-string>gh repo syncgh repo create --disable-issues=true --publicgh repo listgh repo delete <name_of_repo>gh repo clone <name_of_repo>gh repo fork <name_of_repo>
Locally, you create your project with git init
, commit your files and after you should go to the gh repo create
and would be created remotely the repo and locally configured with the remote origin:
mkdir project && cd projectgit initgh repo create
Usually, when you are programming you think should be possible to save a piece of code. You can use the Gist:
Creating a gist easily
touch index.js // after create content for itgh gist create index.js --publicgh gist create -gh gist edit <gist_id> gh gist list --public gh gist list --secret
Handling issues
gh issue creategh issue listgh issue statusgit issue close <#number_issue>gh list -A "<name_issue>"
Handling Pull requests
gh pr create gh pr checkout <name>gh pr diff <#number_of_pr>gh review -c -b "nice work"gh pr close <#number_of_pr> -dgh pr reopen <#number_of_pr>gh pr status
If you get started to use certainly you'll see that's so great tool.
Contacts
Email: [email protected]
Instagram: https://www.instagram.com/luizcalaca
Linkedin: https://www.linkedin.com/in/luizcalaca/
Twitter: https://twitter.com/luizcalaca
Original Link: https://dev.to/luizcalaca/you-need-to-know-about-github-cli-iif
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To