Git
install git:
Run the following command to install git:
brew install git || brew upgrade git
git & github configuration:
- install GitHub CLI:
- Run in terminal:
brew install gh - run in terminal:
gh auth login - select
GitHub.comthenHTTPS - it will ask you about GitHub credentials, Press
yto continue. - select
Login with a web browser. - from terminal copy your one-time code then press
Enterto open github.com in your browser. - if you are not signed in, you will be asked to sign in.
- past one-time code and click
Continuethen clickAuthorize github.
- Run in terminal:
git configuration:
Note: replace YOUR NAME and YOUR EMAIL with the name and email for your GitHub account.
git config --global user.name 'YOUR NAME'
git config --global user.email 'YOUR EMAIL'
git config --global core.editor "code --wait"
git config --global init.defaultbranch main