DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • SRE vs. DevOps
  • Automating the Migration From JS to TS for the ZK Framework
  • Chaining API Requests With API Gateway
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification

Trending

  • SRE vs. DevOps
  • Automating the Migration From JS to TS for the ZK Framework
  • Chaining API Requests With API Gateway
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. GitHub on the Command Line [Snippet]

GitHub on the Command Line [Snippet]

"Hub" is a command-line client for GitHub used to manage issues, pull requests, and conveniently fork or check-out repositories.

Sebastian Daschner user avatar by
Sebastian Daschner
·
Dec. 19, 19 · Code Snippet
Like (3)
Save
Tweet
Share
5.19K Views

Join the DZone community and get the full member experience.

Join For Free
"Hub" is a command-line client for GitHub used to manage issues, pull requests, and conveniently fork or check-out repositories.

The command "hub" is a command-line client for GitHub. You can use it to view or create issues, pull requests, conveniently fork or check-out repositories, and much more.

You may also like: Git Vs. GitHub: Demystifying the Difference

I frequently use the following commands:

  • hub clone <org>/<repo>

  • hub browse and hub browse -- issues which opens in the browser

  • hub pull-request

  • hub issue create

Hub is repository- and branch-aware and the commands usually work as expected. It works with both the public GitHub and GitHub Enterprise. If the GitHub repository defines templates for issues or pull requests, you can use them similar to the following:

Java




x


 
1
hub issue create --edit -F .github/ISSUE_TEMPLATE/bug_report.md



Furthermore, you can set up an alias for git that redirects to hub, since hub wraps all normal Git commands as well.

Have a look at the website or the main page for more examples.

All opinions are my own and do not reflect those of my employer or colleagues.

Further Reading

Git Vs. GitHub: Demystifying the Difference

Global gitignore [Code Snippet]

GitHub Command (computing) Snippet (programming)

Published at DZone with permission of Sebastian Daschner. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • SRE vs. DevOps
  • Automating the Migration From JS to TS for the ZK Framework
  • Chaining API Requests With API Gateway
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: