Organizing Your GitHub

Chaquayla Halmon
5 min readApr 30, 2021

Finally graduated from the Data Science program with Flatiron School. Now the real works begins. Before jumping into the job hunting pool, it’s a good idea to look over your work and make it look professional. My first task was my github projects. If you’re anything like me, my github is a bit messy. During the bootcamp I was so focused on the actual work, that the design wasn’t my top priority. At the time it was okay, but now I want to create something that people would want to look at. So let’s look at a few things that can help make your github look more professional.

So here’s a look at one of my projects. Can you see what can fixed to make it better? Take a minute and look. Here’s one hint: What is this project about?

RENAMING PROJECT

The title is the first clue to what you’re project is about. This will make your repository stand out from others, and it’s super easy to fix.

On the github page there’s a Settings options where you can rename your repository. So instead of a bland name like ‘phase 3 project’, I’ll change it to ‘Twitter Sentiment Analysis’, that way readers can know what to expect to see. You can also add an image in case you want to share it on social media(which is what you want). After renaming your repository, it’s a good idea to update the name in other places you’ve linked your projects, like resumes or linkedin. Look below to see the syntax for changing the url in your terminal.

The git remote set-url origin <new url> changes to the new url and you can use git remote -v to check the remote repository to make sure it works.

ADD GITIGNORE

So I didn’t learn about this til later on. Looking at examples, I saw a lot of github pages with this file, and it’s a great one to have. The gitignore file pretty much tell Git which files to ‘ignore’ or stop tracking. There are certain files that you don’t need to keep track of. For this particular project, the ipynb_checkpoints are unnecessary and there’s one file that is way too big for github. So we don’t need them. Now there are a few ways to do this, so here’s one I like. Steps to create gitignore:

In the local repository

After creating and updating gitignore, don’t forget to add, commit, and push the changes that were made. If you’re looking for a list of common files to ignore working with Python, here’s a github template to check out Github Python github template.

Removing Files

Unfortunately, the files I wanted to ignore has already been tracked, so to clean this mess I will need to manually remove these files. We should also remove data files since Github is not really the place to store those. Please make sure you have local copies of all datasets before removing them. In your local repository you can remove files with the syntax:

git rm <filename>

For some there might be an error so please pay attention to the warning. You might have to add:

git rm -r <filename> to remove the file properly.

So let’s do some cleaning. Knowing this project, there are few files I would like to get rid as well. So a great way to get rid of multiple files:

Syntax: git rm -r <file1> <file2> etc

Awesome now commit your changes and push. Make sure you’re deleting unnecessary files. Alright let’s check our progress.

Look at that, now it’s looking less clustered and will only direct employers to what they need to see. The red marking indicates a few more things to clean to make this look even more professional.

Moving Images

To unclutter repository even more, it’s best to put like items together. For instance all images should be placed in a folder. Great way to have it organized in one place. I already have a folder for images but to make one the syntax is:

mkdir <filename>(images is good)

If you already have a folder you can easily place the image into that folder using this:

git mv <oldlocation/filename> <newlocation/filename>

So in this instance I would use:

Old: where it is | New: where it’s going

VIOLA! All the images a nestled into their file. Just make sure to change this location in your README as well, or the image won’t show. You can also use git mv to change a filename as well. This way you can name what each file is about. So if I wanted to change ‘Some EDA’(boring) to ‘Exploring_Tweets’ I can use:

git mv <oldfilename> <newfilename>

ABOUT SECTION

Last but not least. DO NOT LEAVE THIS PART BLANK! This is the introduction to you project. This gives the overall vision of your work. Here you can give the employers a brief description so they know what to expect. Make it easy for your readers to understand the journey they are about to go on. You can change this right on github. Don’t forget the tags. Great way to show up in searches.

ALL DONE FOR NOW

Now look at that. So much better than before. Nice, clean, and everything important for employers to see. You can look at this and tell exactly what this project is going to be about. There’s no guessing involved, and that’s the final outcome. Bonus: you have a bit of green in the contributions bar, which is a plus for employers.

Of course there might be more you do to beef up your github, but this is a start. SO leave me now data-ists and explore, create, and update. Make sure to present a repository that rivals all others. STAND OUT! This business loves that. Hope this helps and GOOD LUCK on your journey.

--

--