{"id":2273,"date":"2022-10-12T00:56:01","date_gmt":"2022-10-11T22:56:01","guid":{"rendered":"https:\/\/nguenkam.com\/blog\/?p=2273"},"modified":"2022-10-12T01:01:38","modified_gmt":"2022-10-11T23:01:38","slug":"fixes-how-to-fix-git-show-all-file-as-modified-in-wsl","status":"publish","type":"post","link":"https:\/\/nguenkam.com\/blog\/index.php\/2022\/10\/12\/fixes-how-to-fix-git-show-all-file-as-modified-in-wsl\/","title":{"rendered":"[ Fixes ] How to fix Git show all file as modified in WSL"},"content":{"rendered":"\n<p>When you open your code in Windows, and run git in WSL bash, you will have a big chance to meet an issue that&nbsp;<code>git status<\/code>&nbsp;shows all your file get modified. To fix the issue, run this in WSL bash:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global core.autocrlf true<\/code><\/pre>\n\n\n\n<p>We get this bug  because, we are using git in WSL (<strong>Windows Subsystem for Linux<\/strong>), but we  are opening files in Windows system. So the line ending is&nbsp;<code>CRLF<\/code>, but <strong>git<\/strong> thought it\u2019s on Linux so the line should ends with&nbsp;<code>LF<\/code>.<\/p>\n\n\n\n<p>So the fix command will tell git to use&nbsp;<code>CRLF<\/code>&nbsp;and line ending.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you open your code in Windows, and run git in WSL bash, you will have a big chance to meet an issue that&nbsp;git status&nbsp;shows all your file get modified. To fix the issue, run this in WSL bash: We get this bug because, we are using git in WSL (Windows Subsystem for Linux), but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[61,612,529,501],"_links":{"self":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2273"}],"collection":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2273"}],"version-history":[{"count":2,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2273\/revisions"}],"predecessor-version":[{"id":2279,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2273\/revisions\/2279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/2276"}],"wp:attachment":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}