Git - Basic first time / new computer setup

I occasionally build out VMs to work on particular small projects. They are usually Linux (different flavors) and I use them to isolate things like database and web servers.

The problem with doing this is I frequently need to install and configure git. Unto itself, this is not difficult but I wanted to quickly note the settings and configs I set and I figured it might help others' as well.

git config

User name and email address

$ git config --global "John Doe"
$ git config --global

Preferred text/commit note editor. I tend to prefer nano; it has been available on every Linux distro I've ever used...

$ git config --global core.editor nano

Reviewing settings

You can review your settings with $ git config --list

Setting up SSH

I tend to use SSH and this is a quick summary of how to set that up.

Run the keygen: $ ssh-keygen and answer the questions as desired/needed.

You should find, via $ ls -~/.ssh/ that there are now two files.

id_rsa and The first one is your private key -- do not share that and the second one is the public key for things like and GitHub.

Add the public key contents as needed to the sites listed above.

cat ~/.ssh/

Other Suggestions?

If you have a suggestion of other relevant settings, please share below in the comments.

Frank Villasenor

Frank Villasenor

Owner and principal author of this site. Professional Engineering Lead, Software Engineer and Architect working from the Chicagoland area for healthcare SaaS company.
Chicago, IL