From bc222ae8fcfee77f64678fbc1617abcc9e878702 Mon Sep 17 00:00:00 2001 From: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com> Date: Wed, 29 Jul 2020 17:38:00 +0530 Subject: [PATCH] Document about .gitattributes .gitattributes is used by many projects in their development workflows. THis can, many a times, interfere with the Apertis package development workflow. Thus document the fix for such cases. Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com> --- content/guides/apertis_packaging_guide.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/guides/apertis_packaging_guide.md b/content/guides/apertis_packaging_guide.md index 932e94e42..dfce9ec8b 100644 --- a/content/guides/apertis_packaging_guide.md +++ b/content/guides/apertis_packaging_guide.md @@ -445,3 +445,21 @@ Branches: Tags: * `debian/*`: tags for Debian releases in the `debian/*` branches * `apertis/*`: tags for the Apertis releases in the `apertis/*` branches + +Git: + +Gitattributes is a feature that enables modificaitons to be automatically made by git when certain +operations are done (such as `checkout`, `check-in` and `clone`) to enforce certain project standards. +but this has the potential effect of modifying files and that's not what we want when packaging. More +details about [gitattributes](https://git-scm.com/docs/gitattributes). + +* Many upstream projects ship a `.gitattributes` file in their source repositories, which are + tightly tied to their development workflows. At times, certain settings in `.gitattributes` + can lead to problems in our packaging workflow, as summarized above. Thus, it is advised to execute + the following command, which will override any such inherited settings from the + `.gitattributes` file: + + ``` + echo "* -text -eol -crlf -ident -filter -working-tree-encoding -export-subst" > .git/info/attributes + ``` + * This will override the settings in the `.gitattributes` file from the repository, for all files and for the mentioned features -- GitLab