retaildevcrews / helium

A secure Web API reference application using Managed Identity, Key Vault, and Cosmos DB that is designed to be deployed to Azure App Service or AKS.
MIT License
6 stars 7 forks source link

setup .gitconfig consistently based on OS #627

Open dsturgell opened 3 years ago

dsturgell commented 3 years ago

here is a starting point for discussion

autocrlf = true should only be used on Windows

Each dev runs:

git config --global core.whitespace blank-at-eol,blank-at-eof,space-before-tab
git config --global core.autocrlf true

git config --global pull.rebase false
git config --global init.defaultbranch main

git config --global user.name your_user_name
git config --global user.email your_user_name@microsoft.com

Each repo contains in .git/config (I think)

[core]
  whitespace = blank-at-eol,blank-at-eof,space-before-tab
[pull]
        rebase = false
[init]
        defaultBranch = main

We should probably also add a .gitattributes where .sh line endings are always lf as they won't run otherwise. Just in case someone tries to check in a CRLF in a .sh file.