VB6 code line endings are changed when added to Git?

Viewed 234

It seems to be complicated to push Old projects (VB6 projects) and cloning them. I can push all my vb6 project onto the DevOps repository but when I clone it to make some test, I can remark the project doesn't work anymore. The end of line are not the same. I stay in the Windows configuration.

I executed normaly the different operation to push the code onto devOps with

  • git init
  • git remote add origin
  • git config --global core.autocrlf true
  • git add .
  • git commit -m “New project added”
  • git push -u origin master

so when I create another folder and clone the project here and open my VB6 project, I can observe the end of lines are different so It becomes impossible to run the code. Do you have any idea or experience with this problem ?

1 Answers

Consider adding a .gitatttribute file to your project's folder with the following lines in it:

# Visual Basic 6 source files
*.frm eol=crlf
*.bas eol=crlf
*.cls eol=crlf
*.ctl eol=crlf
*.vbp eol=crlf
*.vbw eol=crlf
Related