1
votes

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
Ask on Git? - This has nothing to do with VB6 coding. - John Eason
Clearly, from the descriptions, you need to retain the Windows line ending convention, CR-LF, instead of it being converted to (probably) just LF. Some git option somewhere, I'd suppose? As @JohnEason states, this is not a vb6 issue. - MarkL
It is possible to make Git preserve CRLF data exactly as is. In fact, that's the default on any sane system ... which means it's not the default on most Windows installations. :-) I recommend turning off core.autocrlf; do use .gitattributes if and as appropriate. There is a (small) minefield here so experiment before you commit to any particular method (if you'll pardon the overuse of the verb commit here). - torek

1 Answers

4
votes

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