Basic Git Commands
Show all remotes origin URL
1 min readMar 5, 2018
Delete remote origin
git remote rm ORIGIN_NAMERename remote origin URL
git remote set-url origin NEW_URLCheck Git Info
git config --global --listSet Username
git config --global user.name "YOUR_USERNAME"Then verify that you have the correct username:
git config --global user.nameGet Rio Weber’s stories in your inbox
Join Medium for free to get updates from this writer.
Set Email
git config --global user.email "your_email_address@example.com"To verify that you entered your email correctly, type:
git config --global user.emailCreate SSH Key
ssh-keygen -t rsa -C "your.email@example.com" -b 4096Get SSH Public Key
cat ~/.ssh/id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pubGit reset branch to another branch
- checkout the branch you want to reset
git reset --hard ANOTHER_BRANCH./END
Press enter or click to view image in full size![]()









