Is there a naming convention for git repositories?

前端 未结 6 679
無奈伤痛
無奈伤痛 2021-01-29 17:23

For example, I have a RESTful service called Purchase Service. Should I name my repository:

  1. purchaserestservice
  2. purchase-rest-service
6条回答
  •  爱一瞬间的悲伤
    2021-01-29 18:05

    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.

    1. use lower case.
    2. use dashes.
    3. be specific. you may find you have to differentiate between similar ideas later - ie use purchase-rest-service instead of service or rest-service.
    4. be consistent. consider usage from the various GIT vendors - how do you want your repositories to be sorted/grouped?

提交回复
热议问题