Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
edited tags
Link
Jon Seigel
  • 12.5k
  • 8
  • 61
  • 93
Bounty Ended with VonC's answer chosen by Bas Bossink
Bounty Started worth 150 reputation by Bas Bossink
Post Made Community Wiki
Source Link
Bas Bossink
  • 9.7k
  • 4
  • 45
  • 53

Best practices for cross platform git config?

Context

A number of my application user configuration files are kept in a git repository for easy sharing across multiple machines and multiple platforms. Amongst these configuration files is .gitconfig which contains the following settings for handling the carriage return linefeed characters

[core] autocrlf = true safecrlf = false 

Problem

These settings also gets applied on a GNU/Linux platform which causes obscure errors.

Question

What are some best practices for handling these platform specific differences in configuration files?

Proposed solution

I realize this problem could be solved by having a branch for each platform and keeping the common stuff in master and merging with the platform branch when master moves forward. I'm wondering if there are any easier solutions to this problem?