In order to make sure that projects work well over multiple operating systems, especially when working with others on PHP projects for a Linux server while developing on Windows, the following settings will help keep things consistent across different platforms and tools.

I recommend using all the following settings for git and Visual Studio Code for web development, especially in group projects.

Git configuration

The following settings are required for git use:

git config --global user.name "Your Name"
git config --global user.email you@domain.com

All developers should make sure to set the following configurations for git:

git config --global core.autocrlf false
git config --global core.safecrlf false
git config --global core.ignorecase false
git config --global core.whitespace "fix,blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2"

Optional Git settings

Developers may also want to consider using the following configuration options:

git config --global color.status auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global color.diff auto
git config --global diff.colorMoved zebra
git config --global diff.renames copies
git config --global fetch.prune true

Git Aliases

These git aliases provide shortened versions of frequently used git commands. If you want to know what they do, try typing git with the part in quotes (in your repository) before setting the alias. To use the alias, type git with the alias name, such as git st (for git status) or git lg (for git log with the pretty format shown below.)

git config --global alias.st "status"
git config --global alias.ds "diff --staged"
git config --global alias.ss "submodule status"
git config --global alias.sup "submodule update"
git config --global alias.wa "log --pretty=format:'* %s ' --reverse --since=yesterday"
git config --global alias.lg "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative"

Using SSH Agent with Visual Studio Code

We've struggled using ssh inside VS Code because it either prompts for your passphrase every time or simply won't work at all. While I haven't completely worked out the solution for this, it appears that this article on setting up SSH agent in Windows does contain the solution. Additional information in this Microsoft