semgit-spec-repository-naming:Git存储库的语义命名规范

  • o1_835146
    了解作者
  • 2.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-11 06:01
    上传日期
SemGit存储库命名 语义Git储存库命名规范。 问题 将Git储存库添加到Git帐户时,储存库命名很快就会变得一团糟: 为新存储库提出有意义的名称变得充满挑战 定位现有存储库变得很麻烦 识别存储库变得困难 缺乏一致性会引起很多麻烦,并严重浪费时间和金钱,尤其是在拥有大量存储库和团队成员的组织中。 语义命名试图解决这些问题。 拟议的解决方案 给定prefix-target-description Git存储库名称,请解释: 作为组织或用户标识符的prefix target为目标平台或受众 description作为内容的描述 仅使用小写字符和连字符。 快速示例 没有SemGit 对于没有创建存储库的人来说,很难识别它们: blog blog-1 clientApplication deploymentcli private-api public-api website web
semgit-spec-repository-naming-master.zip
  • semgit-spec-repository-naming-master
  • README.md
    4.1KB
内容介绍
# SemGit Repository Naming Specification for Semantic Git Repository Naming. ## The problem When adding Git repositories to a Git account, repository naming can quickly become a mess: - coming up with meaningful names for new repositories becomes challenging - locating existing repositories becomes cumbersome - identifying repositories becomes hard A lack of consistency can cause a lot of headaches and a serious loss of time and money, especially in organizations with a large number of repositories and team members. Semantic naming attempts to resolve these issues. ## The proposed solution Given a `prefix-target-description` Git repository name, interpret: - `prefix` as the organization or user identifier - `target` as the target platform or audience - `description` as the description of the contents Only lowercase characters and hyphens are used. ## Quick example #### Without SemGit Repositories are hard to identify for people that didn't create them: ```bash blog blog-1 clientApplication deploymentcli private-api public-api website web_server ``` #### With SemGit Repositories are easier to identify and can be sorted alphabetically to group them: ```bash # Go applications semgit-go-private-api semgit-go-public-api # Node applications semgit-node-deployment-cli semgit-node-web-server # Websites semgit-web-ghost-developer-blog semgit-web-corporate-website semgit-web-jekyll-blog # WinRT application semgit-winrt-client-application ``` ## The PREFIX part ### What? The prefix identifies the user or organization. ### Why? This is useful when forking repositories. #### Without SemGit The repository names are changed during the fork process to prevent name collisions: ```bash cats/blog --> me/blog dogs/blog --> me/blog-1 ``` #### With SemGit The original repository names are retained: ```bash cats/cats-web-blog --> me/cats-web-blog dogs/dogs-web-blog --> me/dogs-web-blog ``` #### How? Use a short string to identify the user or organization. ## The TARGET part ### What? The target identifies the target platform or audience for the repository. ### Why? - allows use of similar descriptions for different targets - allows easy filtering when searching repositories - provides immediate semantic context value ### How? Use a short string to identify the target. A few examples: | Target name | Target description | | --- | --- | | angular | Angular library | | docs | Documentation | | go | Go application | | less | LESS stylesheets | | node | Node.js application | | sass | Sass stylesheets | | spec | Official specificiation | | web | Website | ## The DESCRIPTION part ### What? The description part describes the main contents of the repository. ### Why? - identify the repository ### How? Use a string to identify the main contents. Try to use a name that is not dependent on external factors: - **bad**: `semgit-web-www-semgit-org` - **good**: `semgit-web-corporate-website` Avoid `www-semgit-org` because it may require a Git repository name change when the url of the website changes. Use a name that is not likely to change due to external factors. ## FAQ ##### If it's best not to use URL's in Git repository names, how can I quickly locate a repository in GitHub when I only know the website's name? To optimize search results in sites like GitHub, you can specify the website url in the GitHub repository description. This allows others to quickly locate the correct repository. For example: - GitHub repository name: `semgit-web-corporate-website` - GitHub repository description: "Website hosted on http://www.semgit.org" When searching for "semgit.org" in GitHub, the correct repository will shop up. And when the URL of the website changes, no repository name change is required. You can just update the repository description in GitHub. ## Author The SemGit specification is authored by [Jurgen Van de Moere](http://www.jvandemo.com). Contributors: - [Stefan Lapers](http://stefan.lapers.be/) If you'd like to leave feedback, please [open an issue on GitHub](https://github.com/semgit/semgit-spec-repositories/issues). ## License [Creative Commons](http://creativecommons.org/licenses/by/3.0/).
评论
    相关推荐
    • GitLearning
      GitLearning 此存储库供git学习更多评论
    • git-em-all:ClonePull尽可能快地存储git存储库的数组
      git-em-all :warning: 工作正在进行中 尽可能快地克隆/拉取git repostories数组。 安装 npm install git-em-all 用法 var gitEmAll = require ( 'git-em-all' ) 贡献 欢迎捐款! 请先阅读。 执照
    • challenge-git
      离群工程Git挑战 在Outlier,您将能够提供功能和修复程序而不会引起冲突和其他版本控制麻烦。 保持代码库整洁的重要工具是git rebase 。 这项挑战将测试您对...将您的新存储库设置为源: git remote set-url origin $
    • challenge-git
      离群工程Git挑战 在Outlier,您将能够提供功能和修复程序而不会引起冲突和其他版本控制麻烦。 保持代码库整洁的重要工具是git rebase 。 这项挑战将测试您对...将您的新存储库设置为源: git remote set-url origin $
    • git-troubles
      git reset file_name HEAD 重置文件内容(对该文件的所有更改都将丢失) git checkout -- file_name 将整个存储库重置为上一次提交的状态(所有本地更改都将丢失) git reset --hard HEAD 删除最后的提交,但...
    • test:Git 存储库测试
      测试 这是文件自述文件,我将做一些更改以学习如何使用 GitGit 存储库测试
    • weijie:git项目存储
      weijie git项目存储
    • 挑战git
      离群工程Git挑战 在Outlier,您将能够提供功能和修复程序而不会引起冲突和其他版本控制麻烦。 保持代码库干净的重要工具是git rebase 。...将您的新存储库设置为源: git remote set-url origin ${y
    • git-challenge
      离群工程Git挑战 在Outlier,您将能够提供功能和修复程序而不会引起冲突和其他版本控制麻烦。 保持代码库整洁的重要工具是git rebase 。 这项挑战将测试您对...将您的新存储库设置为源: git remote set-url origin $
    • 挑战git
      离群工程Git挑战 在Outlier,您将能够提供功能和修复程序而不会引起冲突和其他版本控制麻烦。 保持代码库干净的重要工具是git rebase 。...将您的新存储库设置为源: git remote set-url origin ${y