Name your github repos with style. Git to it!

What is your name?

Stop. I probably don’t care (I just might!). No one can tell you your name doesn’t suit you, because there are no conventions to naming people.

Do you want to know what else doesn’t have conventions for naming? No, it’s not the d…


This content originally appeared on DEV Community and was authored by Gemini392

What is your name?

Stop. I probably don't care (I just might!). No one can tell you your name doesn't suit you, because there are no conventions to naming people.

Do you want to know what else doesn't have conventions for naming? No, it's not the dishes on expensive menus with weird french names. It's github repositories. If you are a github user, then you might not know this. Since there are no 'proper' rules for naming repositories, we just type the first thing that comes to mind, and bam!

So, how do you name a github repository properly, and why is it important? I'll start by answering the second question. When you reach out to employers sometimes, they ask you for your github profile link. This is because they want to see your activity, projects you've been working on, tech stuff you've been contributing to, and sometimes the tiny green squares at the bottom of the page.

Let's say you created a repository for some really cool project you were working on. You know the project will change your life, you can almost taste the feeling of having someone salute you for your work. And then you go ahead and name the project cool-project1. A moment of silence, because you just killed your chance by 50% already. The repository name sounds like something a github newbie would chose (no offense to github newbies).

So, how do you make your repository name look professional, and make your projects sound way more awesome? I'll walk you through.

  1. First of all, you should already know that github does not support spaces in repo names. So before you spell out cool project 1, you should hit the back space button, because github won't let you.

  2. There is one button on your keyboard that can take you one step closer to naming repositories like a pro. It's the hyphen. The underscore is another one, but using the hyphen is easier. Not only to type out, but also to read. cool-project-1 is easier to type out than cool_project_1, right?

  3. The most important point of all. A repo name should match it's content. I have summarized two ways to do this.

  • [product/project name]-[purpose]: This method is very useful, because just by reading it, you can know what the repository is talking about. Transform cool-project-1 to project1-calculator-vanilla.js. The name suggests that we are making a calculator with vanilla javascript.

  • [language/framework]-[product-project]: This is another method that you can use to write neat, professional looking repositories. This naming style is suitable for open source projects. It lets the contributors know the language or framework which is in use, and then states the purpose of the project. For example, python-password-generator. Doesn't that sound cool? There is a small problem to this method, though. A github repository could consist of files that are written in multiple languages, and this is mostly the case. In that case, this method might really not be the best, and you should take the liberty to use the first.

Welp, now that you have seen how it works, I hope you get down to renaming those amazing projects that don't sound so amazing. Decided to write this article after I realized that I suck at naming repositories, and that they belittle the potential of your work at times. Hope it was of help to you!


This content originally appeared on DEV Community and was authored by Gemini392


Print Share Comment Cite Upload Translate Updates
APA

Gemini392 | Sciencx (2021-11-14T01:13:13+00:00) Name your github repos with style. Git to it!. Retrieved from https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/

MLA
" » Name your github repos with style. Git to it!." Gemini392 | Sciencx - Sunday November 14, 2021, https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/
HARVARD
Gemini392 | Sciencx Sunday November 14, 2021 » Name your github repos with style. Git to it!., viewed ,<https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/>
VANCOUVER
Gemini392 | Sciencx - » Name your github repos with style. Git to it!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/
CHICAGO
" » Name your github repos with style. Git to it!." Gemini392 | Sciencx - Accessed . https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/
IEEE
" » Name your github repos with style. Git to it!." Gemini392 | Sciencx [Online]. Available: https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/. [Accessed: ]
rf:citation
» Name your github repos with style. Git to it! | Gemini392 | Sciencx | https://www.scien.cx/2021/11/14/name-your-github-repos-with-style-git-to-it/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.