Download and install latest version of git
winget install --id Git.Git -e --source winget
By the way if you don’t have the winget tool, to get it first.
Set username in Git
Open the Git Bash
$ git config --global user.name "your_user_name"
Check if you set up your user name successfully
git config user.name
Set e-mail in Git
Open the Git Bash
git config --global user.email "email@example.com"
Check if you set up your e-mail successfully
git config user.email
Connecting over SSH
Check if you have SSH keys already
Open Git Bash
ls -al ~/.ssh
If no SSH keys exist, generate new SSH keys then
/c/Users/User/.ssh/id_ed25519
Adding SSH key to ssh-agent
Launch SSH agent manually
eval "$(ssh-agent -s)"
Add your SSH key to the SSH agent
ssh-add ~/.ssh/id_ed25519
Set up your SSH key in GitHub
Copy the SSH public key to your clipboard.
Open Git Bash
clip < ~/.ssh/id_ed25519.pub
Go to GitHub page
Account -> Setting -> SSH keys -> Add new ssh key -> paste