GitHub is a platform for storing and sharing code. This guide covers basic GitHub commands to help you manage your code, track changes, and work with others on projects.
git config --global user.email "villanuevajoshua27@gmail.com"
git config --global user.name "koykoy027"
git config user.email "villanuevajoshua27@gmail.com"
git config user.name "koykoy027"
ssh-keygen -t rsa -b 4096 -C "villanuevajoshua27@gmail.com"
git credential-store --file ~/.git-credentials store <<EOF
protocol=https
host=github.com
username=koykoy027
password=`your_personal_access_token`
EOF
git config --global credential.helper store
To check the global Git user name:
git config --global user.name
To check the global Git user email:
git config --global user.email
To check the list of all configurations, including user-related configurations:
git config --global --list
If you are looking to see which user is currently authenticated for a specific repository, you can use the following command:
git config user.name
If you want to see information about the currently logged-in user on your Ubuntu system, you can use the whoami command:
whoami
update default branch, from master
to main
git branch -m master main
git fetch origin
git branch -u main main
git remote set-head origin -a
If the remote URL or branch name is incorrect, update it using the following commands
git remote set-url origin <new-remote-url>
git branch --set-upstream-to=origin/<correct-branch-name> main
*
!*gitignore
git revert -m 1 <SHA>