If you are a software engineer and you don’t know about GitHub, you should. You are probably already be on LinkedIn, but what better way to describe your software than to show it on GitHub. I can’t imagine a better way for a prospective employer to pre-qualify a software engineer than to view some of their code. This is assuming that the code you have is owned by you or will not violate any legal issues if you share it.
Here is what you need to do:
1. Get a free account at GitHub, install and configure it to your specifications. One thing to keep in mind is that you want your username to be as close to your real name as possible.
Below are a couple of useful configuration options entered via the terminal.
git config --get user.name git config --get user.email
These should be the same as what you used to create an account at GitHub. If you don’t get anything back do the following:
git config --global user.name "John Doe" git config --global user.email "email@example.com"
If you want to exclude files, type in:
git config --global core.excludesfile ~/.gitignore_global
echo '.excluded file/' >> ~/.gitignore_global
for each file you want excluded.
Rather than push all of your files, the following will just push the branch you are currently working on:
git config --global push.default current
2. Confirm your account. In the terminal type:
pbcopy < ~/.ssh/id_rsa.pub
Go to https://github.com/settings/ssh. Click Add SSH key, put ‘Laptop’ in Title, then Paste in the Key box. Verify the SSH Key settings by typing the following into the terminal:
ssh -T firstname.lastname@example.org
Once confirmed, type:
to initialize the git program on your system
3. Create a new repository for your code at GitHub. Just to the right of your username, you should see a “+” symbol. Click on it and chose “New Repository”. You should name it after an existing directory where you have the code that you want the world to see and click “Public” and the “Create Repository” button. GitHub then makes it as easy as possible by giving you a couple of options for code to paste into your terminal and run. Reload the browser and bingo, your code is now on the web!
4. If you need to make changes to your code, once you are done with your changes, in the terminal, run:
to see that the file has been changed and can be staged.
git add 'filename'
to stage the file
to commit the file to be pushed to GitHub.
to push the file to GitHub. You can check the website to see that your changes made it.
If you happened to be on GitHub’s website and you wanted to make a change to your code, you could do it there also. Once finished saving your changes, back in the terminal, you could type:
to update the file on your laptop from GitHub’s website.
5. Make sure your GitHub profile link is on LinkedIn and on your resume. Prospective employers may be able to stumble onto your GitHub account using google, but why not just give them the link?