Installing GitHub CLI and Adding Useful Aliases
Installing GitHub CLI
Open a terminal and follow the instructions for your operating system:
For macOS:
shbrew install ghFor Windows:
shwinget install --id GitHub.cliFor Linux:
shsudo apt install ghAuthenticate GitHub CLI with your GitHub account:
shgh auth login
Adding Useful Git Aliases
Open your Git configuration file:
shnano ~/.gitconfigAdd the following aliases to enhance your Git productivity:
ini[alias] co = checkout br = branch ci = commit st = status lg = log --oneline --graph --decorate --all last = log -1 HEAD unstage = reset HEAD -- amend = commit --amend --no-edit
Adding Useful GitHub CLI Aliases
Open your GitHub CLI configuration file:
shnano ~/.config/gh/config.ymlAdd the following aliases to enhance your GitHub CLI productivity:
yamlaliases: pr: pull-request prc: pr create prl: pr list prr: pr review prmr: pr merge isu: issue isuc: issue create isul: issue list
By following these steps, you can install GitHub CLI and add useful aliases to both Git and GitHub CLI, enhancing your productivity and streamlining your workflow.