Reset the git repostiory after adding gitattributes
Because, for many repositories which carry Carriage Return Line Feeds,
aka CR;LF, just adding the .gitattributes is not enough. For it to make
effect for the already cloned repository, a git reset --hard
is needed
Consider the below:
https://gitlab-apertispro.boschdevcloud.com/pkg/bnd/-/jobs/933233
- The repository is cloned (with CRLF files)
- A .gitattributes is added to ignore CRLF files
- Changes aren't effective immediate
The above pipeline job failed because of the order of events. This
proposed MR just does a git reset --hard
effectively bringing the
.gitattributes
into action.
Signed-off-by: Ritesh Raj Sarraf ritesh.sarraf@collabora.com