Git Repository 이름 규칙
일관성 및 가독성 있는 Repository 관리를 위해, 자주 사용되는 Git Repository 이름 규칙을 알아보자.
1. kebab-case with lower case
Git Repository 이름 규칙과 관련된 Stack Overflow의 답변을 참고하였다. 참고한 내용은 아래와 같다.
1-1. First answer
_
is harder to type than-
1-2. Second answer
The problem with camel case is that there are often different interpretations of words - for example, checkinService vs checkInService. Going along with Aaron's answer, it is difficult with auto-completion if you have many similarly named repos to have to constantly check if the person who created the repo you care about used a certain breakdown of the upper and lower cases. avoid upper case.
His point about dashes is also well-advised.
- use lower case.
- use dashes.
- be specific. you may find you have to differentiate between similar ideas later - ie use purchase-rest-service instead of service or rest-service.
- be consistent. consider usage from the various GIT vendors - how do you want your repositories to be sorted/grouped?
1-3. Third answer
lowercase-with-hyphens
is the style I most often see on Github.*
lowercase_with_underscores
is probably the second most popular style I see.The former is my preference because it saves keystrokes.
*Anecdotal; I haven't collected any data.
1-4. Summary
정리하면 아래와 같다.
- 소문자를 사용하라. (Use lower case)
- 대시(
-
)를 사용하라. (Use dashes) - 명확하게 작성하라. (Be specific)
- 일관성있게 작성하라. (Be consistent)