Sitemap
riow

Publications are personal

Basic Git Commands

Show all remotes origin URL

1 min readMar 5, 2018

--

Delete remote origin

git remote rm ORIGIN_NAME

Rename remote origin URL

git remote set-url origin NEW_URL

Check Git Info

git config --global --list

Set Username

git config --global user.name "YOUR_USERNAME"

Then verify that you have the correct username:

git config --global user.name

Get 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.email

Create SSH Key

ssh-keygen -t rsa -C "your.email@example.com" -b 4096

Get SSH Public Key

cat ~/.ssh/id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pub

Git reset branch to another branch

  1. checkout the branch you want to reset
git reset --hard ANOTHER_BRANCH

./END

Press enter or click to view image in full size

--

--