1
0
mirror of https://github.com/gitattributes/gitattributes.git synced 2025-01-22 08:18:50 -05:00
Go to file
Daniel Rothmaler 695406f496 Add Config for Maven-/Gradle-Wrapper-Scripts
Maven and Gradle provide quite common wrapper scripts to use them
without explicitly installing them before.
This is done by `mvnw` and `gradlew` shell scripts,
without an explicit `.sh` extension.
The Windows versions of the scripts to contain the `.cmd` extension,
so there is no need to handle them explicitly.
2023-03-10 18:06:29 +01:00
.github/workflows add pre-commit workflow 2020-11-08 14:22:14 -08:00
.gitattributes Add CRLF EOL for Window-specific file formats and add diffs (#129) 2021-03-23 18:02:16 +13:00
.gitignore Add F# and tweak C# (#128) 2021-03-10 19:41:29 +13:00
.pre-commit-config.yaml add pre-commit workflow 2020-11-08 14:22:14 -08:00
ActionScript.gitattributes Improved ActionScript gitattributes 2019-04-18 16:48:32 +12:00
Ada.gitattributes feat: Support *.adb and *.ads 2019-07-17 15:25:27 +12:00
Ballerina.gitattributes Proper sh line endings and added bash support 2019-04-21 13:32:14 +12:00
C++.gitattributes Update C++.gitattributes 2021-10-14 15:51:05 +02:00
Common.gitattributes Add epub to Common (#166) 2022-07-12 21:24:46 +12:00
CSharp.gitattributes Do not use merge=union for C# projects, F# projects, and VS solutions 2022-07-07 21:39:09 +03:00
Delphi.gitattributes Format gitattributes files 2019-04-20 12:35:18 +12:00
Drupal.gitattributes Remove extra spaces 2019-07-04 20:32:22 +12:00
Elixir.gitattributes Update Elixir.gitattributes 2020-11-18 23:40:10 +13:00
Flutter.gitattributes Flutter (#130) 2021-04-03 02:34:26 +13:00
Fortran.gitattributes feat: Support *.for 2019-07-17 15:21:18 +12:00
Fountain.gitattributes Format gitattributes files 2019-04-20 12:35:18 +12:00
FSharp.gitattributes Do not use merge=union for C# projects, F# projects, and VS solutions 2022-07-07 21:39:09 +03:00
Go.gitattributes Add diff support for golang file 2019-03-09 15:22:19 +13:00
Java.gitattributes Add Config for Maven-/Gradle-Wrapper-Scripts 2023-03-10 18:06:29 +01:00
LICENSE.md Create LICENSE.md 2015-11-01 20:36:42 -08:00
Lua.gitattributes Merge branch 'master' into patch-7 2019-04-18 11:29:25 +12:00
Markdown.gitattributes Add Markdown in gitattributes 2022-09-23 10:05:12 -07:00
Mathematica.gitattributes Add Mathematica (#113) 2020-05-19 16:10:47 +12:00
Matlab.gitattributes Added Matlab diff 2019-03-09 15:33:13 +13:00
MicrosoftShell.gitattributes Microsoft Shell.gitattributes -> MicrosoftShell.gitattributes 2021-11-25 20:14:25 -08:00
ObjectiveC.gitattributes Format gitattributes files 2019-04-20 12:35:18 +12:00
Pascal.gitattributes feat: Support *.p 2019-07-17 15:23:10 +12:00
Perl.gitattributes Format gitattributes files 2019-04-20 12:35:18 +12:00
PowerShell.gitattributes Create PowerShell.gitattributes 2021-11-20 15:48:50 +01:00
Python.gitattributes Jupyter notebooks are always created with LF (on Windows) 2022-12-07 21:09:26 +01:00
R.gitattributes Correct setting for .Rmd files 2021-11-20 16:17:17 +00:00
Rails.gitattributes Ruby diff 2019-04-19 19:00:18 +12:00
README.md Add script to check for missing .gitattributes rules (#146) 2021-10-10 13:22:01 +13:00
Rust.gitattributes Create Rust.gitattributes 2021-10-08 21:13:11 +02:00
Servoy.gitattributes Remove broken links 2021-08-07 12:17:32 -07:00
sql.gitattributes add comment for sql .gitattributes 2022-05-25 15:04:58 +02:00
Swift.gitattributes chore: Add top comment 2019-07-06 13:26:08 +12:00
Unity.gitattributes Add new image file format 2022-05-02 09:26:28 -04:00
Vim.gitattributes Added Vim (#119) 2020-10-15 10:46:15 +13:00
VisualStudio.gitattributes Fix misspelling 2020-06-16 15:57:01 +12:00
Web.gitattributes adapt LF in .ipynb (Jupyter notebooks) as well 2022-12-15 13:46:06 +01:00

A Collection of Useful .gitattributes Templates

Similarly to the .gitignore Templates, we're trying to build templates for .gitattributes.

Common.gitattributes contains general exclusions that may apply to any project. Consider including them if they are applicable to your project.

You can use this handy dandy generator to generate your gitattributes files on the fly based on files inside of this repository.

CI step

To check if all files have a corresponding rule in .gitattributes, this script can be used:

missing_attributes=$(git ls-files | git check-attr -a --stdin | grep "text: auto")
if [[ "$missing_attributes" ]]; then
  echo ".gitattributes rule missing for the following files:";
  echo "$missing_attributes";
else
  echo "All files have a corresponding rule in .gitattributes";
fi

Contributing

Please contribute by forking and sending a pull request.

Also please only modify one file per commit. This'll make merging easier for everyone.

For more information on gitattributes: gitattributes(5) and for Github-specific grammar: Linguist docs