Skip to content

Instantly share code, notes, and snippets.

@wastefulox
Created August 29, 2018 12:40
Show Gist options
  • Save wastefulox/d444b1637f1b863d50deb61f6a282588 to your computer and use it in GitHub Desktop.
Save wastefulox/d444b1637f1b863d50deb61f6a282588 to your computer and use it in GitHub Desktop.
Setting up GitHub
I wanted to do a few things to make my life easier when using GitHub and because I have to do some of these things so rarely, I wanted to document, in one solid spot, the things I do to setup my system to work with GitHub. For everyone's information, I setup Git on my PC using the terminal on Ubuntu 18.04.
From the terminal, I execute the following commands. This assumes an installation of Git exists on your box but that is just installing a package and I am confident we can all do that or we can Google it.
1. git config --global user.name "my name"
2. git config --global user.email "my.email@goofle.com"
That was everything on the command line for now! The next problem I encountered was having to type in my password everytime I was pushing code up stream. I use a random collection of numbers, letters, and symbols and it is more than 16 characters long so what I really needed was an SSH key on my box so I could stop typing in that password!
I am not going to go through creating and merging the SSH key here because the links below do a great job of walking a user through it. This way, if something changes, GitHub can update their documentation and we aren't doing the same thing twice!
I then created a repository, ignoring the instructions below, for my existing code on my box, creating a README.md file in the process, which gummed up the whole process. To be honest, it would have been easier to delete the repo and start again, as nothing had been created except for the stupid README.md file, which I could have easily deleted, so I am not going to rehash how I forced it to work but if this happens to you, just use the link below and read all of the instructions.
References:
Setting up Git: https://help.github.com/articles/setting-your-username-in-git/
Generating a new SSH Key: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
Adding the SSH Key to GitHub: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Adding an Existing Project to GitHub: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment