Git
What's a developer without Git? To install, simply run:
brew install gitWhen done, to test that it installed fine you can run:
git --versionAnd which gitshould output/usr/local/bin/git. If not, try restarting the terminal.
Next, we'll define your Git user (should be the same name and email you use for GitHub):
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"They will get added to your .gitconfig file.
To push code to your GitHub repositories, we're going to use the recommended HTTPS method (versus SSH). So you don't have to type your username and password every time, let's enable Git password caching as described here:
git config --global credential.helper osxkeychainSSH Keys
You can generate ssh keys for your machine by running
ssh-keygenThen, press enter thrice.
You can checkout your public key by navigating to
cd ~/.sshType ls -a and you should be seeing id_rsa (your private key) and id_rsa.pub (your public key)

Then type cat id_rsa.pub to see your public key so you could copy paste it to your Github/Bitbucket
Last updated
Was this helpful?