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 = lfin.editorconfig. - Create
.gitattributesfile containing* text=auto eol=lf. - Commit.
- Run
git add --renormalize . - Commit.
Sources: https://stackoverflow.com/a/42135910, https://git-scm.com/docs/gitattributes#_effects