Setting Up Git and GitHub CLI

Setting Up Git and GitHub CLI: A Quick Guide

Configure Git User Information

First, set up your Git user name and email:

$ git config --global user.name "John Doe"
$ git config --global user.email "example@mail.com"

Verify your configuration

$ git config --list

Install GitHub CLI

Install the GitHub CLI (gh) to streamline your GitHub workflow. Follow these steps:

$ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg

Add the GitHub CLI repository:

$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null

Update your package list and install GitHub CLI:

$ sudo apt update
$ sudo apt install gh

Authenticate GitHub CLI

$ gh auth login
$ git clone example_remote_repo

links

social