When working with VB6 and uploading to GitHub, modify the .gitattributes file to look like the below:
# Default behaviour
* text=auto
# VB6 source files must stay CRLF
*.bas text eol=crlf
*.cls text eol=crlf
*.frm text eol=crlf
*.vbp text eol=crlf
*.vbg text eol=crlf
*.ctl text eol=crlf
*.dsr text eol=crlf
*.txt text eol=crlf
# VB6 binary companion files
*.frx binary
*.res binary
*.exe binary
*.ocx binary
*.dll binary
* text=auto
# VB6 source files must stay CRLF
*.bas text eol=crlf
*.cls text eol=crlf
*.frm text eol=crlf
*.vbp text eol=crlf
*.vbg text eol=crlf
*.ctl text eol=crlf
*.dsr text eol=crlf
*.txt text eol=crlf
# VB6 binary companion files
*.frx binary
*.res binary
*.exe binary
*.ocx binary
*.dll binary
If doing retrospectively, then we should do the following:
git add --renormalize .
git commit -m "Fix line endings for VB6"
git add --renormalize .
git commit -m "Renormalize line endings"
git reset --hard
The following is a check to see if the files are LF or LFCR;
git ls-files --eol
No comments:
Post a Comment
Note: only a member of this blog may post a comment.