Pranjal Mittal Pranjal Mittal - 5 months ago 56
Git Question

Is it suggested to have Git repository names in upper or camel case instead of lower case?

I see a lot of projects keeping lower case names for their GitHub repositories.

Is it suggested to have repository names in Upper Case or Camel Case?

If (yes/no) why?

Tim Tim

Short answer

As shown in this short article, a good naming convention would be :

  • use lowercase;
  • separate word with hyphens.

Long answer

As far as I know there is no standard convention about letter case for naming Git repositories.

While others VCSs may require lowercase repository names, Git doesn't. So you're free to give your repository the same name as your project/product (excluding spaces and accents or any other system-dependent text representations).

For multiple-words-repositories, prefer hyphens - to underscores _ as GitHub guys do, though it may be an inheritance from the times when GitHub was not yet able to handle uppercase. Of course, you can also use CamelCase (or lowerCamelCase).

Then, a good reason to stick to lowercase is that repository names are often seen in URLs that may be case insensitive or even converted to lower case (it happened to GitLab or Jira users for example in the past). In my experience I've never met such constraints, so I'm happy with my product names beginning with an uppercase letter.

Hope this helps,