Jose Cabrera Zuniga
Jose Cabrera Zuniga

Reputation: 2637

Configuring git to support programmers working with different Operating Systems

We have some programmers, one working in Linux, one working in Windows, and another in OSX. We need to push to the same git repo but I am afraid that this could create estrange complications. In fact, I once cloned this repo using Linux and I could not find some folders that appeared in the repo which was originally created from windows. Is there any setting in Git (particularly, gitlab) that could help us to have a repo "working" for any of our platforms?

Upvotes: 1

Views: 102

Answers (1)

sergej
sergej

Reputation: 18019

I would probably start with:

(1) To avoid the annoying OSX .DS_Store files being accidentally commited or show as untracked, add .DS_Store to the top level .gitignore file in your project.

(2) To avoid problems with line endings (eg. Linux vs. Windows), add * text=auto to the .gitattributes file.

(3) As Windows is not case sensitive, you may want to set the core.ignoreCase option to true (git config core.ignoreCase true).

(4) In Git for Windows, you might stumble upon Filename too long problems , setting the option core.longPaths to true may help in this case (git config core.longPaths true).

...

However, each project is different and there no "one fits all" answer.

Upvotes: 1

Related Questions