git remote set-url <remote> <url>
git remote set-url <remote> git@github.com/<username>/<repository>.git
git remote set-url <remote> https://github.com/<username>/<repository>.git
First commit any code changes, then run: git rm -r --cached .
and then re-add: git add .
.
To undo: git rm --cached filename
then git add filename
- Clean working directory.
- Set
end_of_line = lf
in.editorconfig
. - Create
.gitattributes
file containing* text=auto eol=lf
. - Commit.
- Run
git add --renormalize .
- Commit.
Sources: https://stackoverflow.com/a/42135910, https://git-scm.com/docs/gitattributes#_effects