Skip to content

Reset the git repostiory after adding gitattributes

Ritesh Raj Sarraf requested to merge wip/ritesh/git-reset-repository.master into master

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

  1. The repository is cloned (with CRLF files)
  2. A .gitattributes is added to ignore CRLF files
  3. 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

Merge request reports

Loading