Disabling eol on bitbucket

1

As versioning tools I use Bitbucket and Sourcetree. It just seems like they get lost in the eol, saying that same files are different. It seems to me that the solution is to disable eol in .gitattribute

But I can not ...

Does anyone have any help?

Hugs

    
asked by anonymous 08.10.2015 / 22:22

1 answer

3

Usually this happens because of differences like some platforms or text editing programs work the line terminators. Linux uses \ n (LF = 1 byte) while Windows by default uses \ r \ n (CRLF = 2 bytes). You should standardize the termination in your code editor or IDE (if it is a source code file) or configure for git to automatically detect whether or not to handle the line breaks. Eg how to add settings in local git: git config --global core.autocrlf true

If you prefer directly in the .gitattributes file:

# Declara arquivos que sempre terão terminadores de linha CRLF no checkout.
*.sln text eol=crlf
# Declara arquivos que sempre terão terminadores de linha LF no checkout.
*.code text eol=lf

See other details here link

On doing this ignore on bitbucket, it seems that there is no way, as there is no option to add this directive.

    
09.10.2015 / 00:08