Tuesday, June 23, 2015

Install MsysGit on Win 10 (for Unix Developers)

Download Msysgit.

Install to C:\dev\git

Keep all the default installation options

Choose "Use Git from the Windows Command Prompt"


Have Git use Plink from PuTTY



Make sure Windows does NOT mess with line endings.  Leave them alone.


The reason for this, is sometimes we compute file hashes, like PHP Composer for example, and if there are \r characters in the file then Windows computes the hashes differently than Unix, which is stupid.

For this to work, you must use a decent text editor that understands that there are many ways to end a line, not just \n\r.

Voila!  You now have Git, and it is configured correctly for cross-platform development.

Updates


10-May-16: Updated line endings option - NEVER automatically change line endings!  This way you get full control over line endings from your editor.  So if your line endings are messed up, it's your own fault, and you can easily fix it.

No comments:

Post a Comment