SicroAtGit / PB-CodeArchiv-Rebirth

A collection of useful codes from the PureBasic forums and other sources.
Other
72 stars 22 forks source link

Add gitattributes #4

Closed tajmone closed 6 years ago

tajmone commented 6 years ago

New ".gitattributes" settings to handle common text/binary extensions for this project and EOLs normalization.

tajmone commented 6 years ago

With this pull request I've added a .gitattributes settings file to handle properly line-endings normalization; and fixed on my local clone the EOLs in some already tracked files which were currently wrongly normalized during check-in.

This will prevent EOL conflicts with cross-platform Git operations. I've added the most common settings which are (or might be) relevant to this project, including some extensions not currently used but which are potentially useful.

About .gitignore Settings

I've noticed that you've commented out the following settings in the .gitignore file:

### PureBasic ###
# PureBasic

# Settings files (I think that this files shouldn't be ignored)
#*.pb.cfg
#*.pbi.cfg
#project.cfg

In my opinion these should be gitignored because they change at save-time, and will cause Git to detect lots of spurious file changes. See my article on the topic:

http://htmlpreview.github.io/?https://github.com/tajmone/pb-archives-test/blob/source/pb-development/git/index.html

I didn't change the .gitignore file because I wanted to discuss it with you before, and consider if there might be benefits in keeping the PB settings in the project.

SicroAtGit commented 6 years ago

Thank you for the file ".gitattributes". Looks very good.

Yes, the config files (*.pb.cfg etc.) should be ignored.

I have seen that you have added a file header with the source of the repository in the files ".gitattributes" and ".gitignore". That's a good idea.

Please make a few changes to your commit:

tajmone commented 6 years ago

Ok, done. I've amended the original commit so we keep the history clutter-free.

SicroAtGit commented 6 years ago

The new file header in ".gitignore" I moved from the first commit to the second commit. Please only include files in a commit that belong to the changes described in the commit.

I have rebased your branch "gitattributes" with "master" before I performed the merge. Thus the git history remains clean without ugly merge commits.