Skip to main content

Git

2023


Improve Git speed in WSL

·2 mins

The disk performance in WSL2 is poor, it takes a long time to run git status in a host’s repo. Moreover, if you set a fancy shell prompt, it will take a long time to show the prompt. This article will introduce how to speed up Git in WSL2.

Line Ending in Git

·3 mins

When working on a project with multiple developers, the line ending can be troublesome. This article will explain how to configure line ending in Git.

Basic configuration #

The line ending on Windows is CRLF, on Linux is LF. To prevent the line ending issue, we can set core.autocrlf to true on Windows to let git convert CRLF to LF when commit, and convert LF to CRLF when checkout. It is automatically configured if you install git on Windows.