-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
主要是修改了‘.gitattributes文件的使用’的部分 Changes to be committed: new file: README-en.md modified: README.md new file: doc/gitattributes.md
- Loading branch information
1 parent
492011c
commit 115ac77
Showing
3 changed files
with
294 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
hello-world | ||
====== | ||
|
||
[中文说明](https://github.com/yansheng836/hello-world/blob/master/README.md) [English](https://github.com/yansheng836/hello-world/blob/master/README-en.md) | ||
|
||
This repository is my first repository. | ||
|
||
I used the repository just to practice using github. | ||
|
||
|
||
|
||
## Code of Conduct | ||
|
||
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md) | ||
|
||
如果你想要参与贡献必要准遵守我们的[行为准则](code-of-conduct.md);如果你发现有人违反该准则,可以通过[我的邮箱](yansheng0063@163.com)联系我。 | ||
|
||
|
||
|
||
## Contributing | ||
|
||
Our goal is for this project to reflect community best practices, so we'd love your input! Got a question or an idea? Check out our [contributing guidelines](CONTRIBUTING.md) for ways to offer feedback and contribute. | ||
|
||
|
||
|
||
|
||
## License | ||
|
||
<div style="text-align:left"><img src="https://img.shields.io/github/license/yansheng836/hello-world.svg"/></div> | ||
|
||
This software is licensed under the MIT License. [View the license](https://github.com/yansheng836/hello-world/blob/master/LICENSE). | ||
|
||
|
||
|
||
|
||
|
||
## Github pages | ||
|
||
2019年7月22日11:07:27 添加 | ||
|
||
[https://yansheng836.github.io/hello-world/](https://yansheng836.github.io/hello-world/) | ||
|
||
|
||
|
||
## .gitattributes | ||
|
||
<https://github.com/github/linguist> | ||
|
||
|
||
|
||
被下面属性标记为true的,github将不进行语言统计。 | ||
|
||
| .gitattributes属性分类 | | 说明 | 举例 | | ||
| ------------------------ | ---------- | ---------------------------------------- | --------------------------------------- | | ||
| `linguist-language` | 语言 | 将一种语言识别为另一种语言 | `*.rb linguist-language=Java` | | ||
| `linguist-vendored` | 供应商代码 | 标记不是自己编写的供应商代码,如js库文件 | `jquery.js linguist-vendored` | | ||
| `linguist-generated` | 生成的代码 | | | | ||
| `linguist-documentation` | 文档 | | `project-docs/* linguist-documentation` | | ||
| `linguist-detectable` | 可检测的 | | | | ||
|
||
注意: | ||
|
||
1. 等号前后是不能有空格的! | ||
2. 对于 `jquery.js linguist-vendored=true`这种属性值为布尔值的,好像只有使用 `jquery.js linguist-vendored`这种形式才有用。 | ||
|
||
|
||
|
||
>## Overrides | ||
> | ||
>Linguist supports a number of different custom override strategies for language definitions and file paths. | ||
> | ||
>### Using gitattributes | ||
> | ||
>Add [a `.gitattributes` file](https://git-scm.com/docs/gitattributes) to your project and use standard git-style path matchers for the files you want to override using the `linguist-documentation`, `linguist-language`, `linguist-vendored`, `linguist-generated` and `linguist-detectable`attributes. `.gitattributes` will be used to determine language statistics and will be used to syntax highlight files. You can also manually set syntax highlighting using [Vim or Emacs modelines](https://github.com/github/linguist#using-emacs-or-vim-modelines). | ||
> | ||
>When testing with a local installation of Linguist, take note that the added attributes will not take effect until the `.gitattributes` file is committed to your repository. | ||
> | ||
>File and folder paths inside `.gitattributes` are calculated relative to the position of the `.gitattributes` file. | ||
> | ||
>``` | ||
># Example of a `.gitattributes` file which reclassifies `.rb` files as Java: | ||
>*.rb linguist-language=Java | ||
>``` | ||
> | ||
>#### Vendored code | ||
> | ||
>Checking code you didn't write, such as JavaScript libraries, into your git repo is a common practice, but this often inflates your project's language stats and may even cause your project to be labeled as another language. By default, Linguist treats all of the paths defined in [`vendor.yml`](https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml) as vendored and therefore doesn't include them in the language statistics for a repository. | ||
> | ||
>Use the `linguist-vendored` attribute to vendor or un-vendor paths: | ||
> | ||
>``` | ||
>special-vendored-path/* linguist-vendored | ||
>jquery.js linguist-vendored=false | ||
>``` | ||
> | ||
>#### Documentation | ||
> | ||
>Just like vendored files, Linguist excludes documentation files from your project's language stats. [`documentation.yml`](https://github.com/github/linguist/blob/master/lib/linguist/documentation.yml) lists common documentation paths and excludes them from the language statistics for your repository. | ||
> | ||
>Use the `linguist-documentation` attribute to mark or unmark paths as documentation: | ||
> | ||
>``` | ||
>project-docs/* linguist-documentation | ||
>docs/formatter.rb linguist-documentation=false | ||
>``` | ||
> | ||
>#### Generated code | ||
> | ||
>Not all plain text files are true source files. Generated files like minified JavaScript and compiled CoffeeScript can be detected and excluded from language stats. As an added bonus, unlike vendored and documentation files, these files are suppressed in diffs. [`generated.rb`](https://github.com/github/linguist/blob/master/lib/linguist/generated.rb) lists common generated paths and excludes them from the language statistics of your repository. | ||
> | ||
>Use the `linguist-generated` attribute to mark or unmark paths as generated. | ||
> | ||
>``` | ||
>Api.elm linguist-generated=true | ||
>``` | ||
> | ||
>#### Detectable | ||
> | ||
>Only programming languages are included in the language statistics. Languages of a different type (as defined in [`languages.yml`](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)) are not "detectable" causing them not to be included in the language statistics. | ||
> | ||
>Use the `linguist-detectable` attribute to mark or unmark paths as detectable: | ||
> | ||
>``` | ||
>*.kicad_pcb linguist-detectable=true | ||
>*.sch linguist-detectable=true | ||
>tools/export_bom.py linguist-detectable=false | ||
>``` | ||
|
||
|
||
举例:<https://github.com/github/linguist/issues/4590> | ||
|
||
>1. Create a file named `.gitattributes` in the root of your project | ||
> | ||
>2. Add the following lines to the `.gitattributes` file: | ||
> | ||
> ``` | ||
> /BibliotecaGames.Entities/* linguist-vendored=true | ||
> /BibliotecaGames.BLL/* linguist-vendored=true | ||
> ``` | ||
> | ||
>3. Modify a file in your project to force GitHub to detect the new `.gitattributes` file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.