https://git-school.github.io/visualizing-git/
ssh-keygen -t rsa -b 4096
git remote -v
git clone -o <remote name> git@github.com:bscpaz/<repository>
git clone git@github.com:<user>/<repositorio>.git
git remote add <remote name> https://git....
git remote set-url origin git@github.com:bscpaz/<repository>
git remote remove <remote name>
git remote rename <old> <new>
https://www.freecodecamp.org/news/how-to-fix-git-always-asking-for-user-credentials/
git config core.sshCommand 'ssh -i "/home/bscpaz/.ssh/id_rsa"'
git config --global user.name "Bruno Paz"
git config --global user.email "soujava@gmail.com"
git config --local user.name "Bruno Paz"
git config --local user.email "soujava@gmail.com"
git config --global credential.helper store
sudo apt-get install gnome-keyring
git config --global credential.helper gnome-keyring
git config --global credential.useHttpPath true
Note: if the authentication fails, close the terminal and try again.
git config --global user.name
git config --global user.email
git config --local user.name
git config --local user.email
git branch
git branch -D <branch name>
git checkout -b <branch name> --track <remote>/<branch>
git checkout <branch name>
git branch -m <new name>
git log -p .
git log -p <file-name>
git diff <file-name>
git commit --amend --author="Bruno Paz<soujava@gmail.com>"
Issue:
Clonning a git repository using WSL2 occurs timeout on port 22 or 443
bscpaz@2am:/$ git clone git@github.com:bscpaz/<some-repo>
Cloning into '<some-repo>'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Solution:
- First, check if your WSL2 can run a "sudo apt-get update". If not, it's a general problem.
- Turn off your VPN and try again.