[{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThe Windows Github Desktop program is an easy to use Git GUI for Windows users and it works great in most situations.\u0026nbsp; However, it has a notorious history of converting every file in a Git repository checkout/clone to all CRLF (Windows Style) line endings. \u0026nbsp;Line endings are also known as EOL's (End of Line).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eTo make line endings visible in Notepad++ go to\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eView \u0026gt; Show Symbols \u0026gt; Show End of Line\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eHere's an example of what CRLF's look like when made visible.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/792/original/CRLF_Visible.JPG?1712298848","metadata":{"caption":"Example of a file with CRLF line endings."}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThere are ways of manually converting EOL's to LF using Notepad++\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eEdit \u0026gt; EOL Conversion \u0026gt; Unix (LF)\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eYou can also setup Macro's in Notepad++ to automate this process by running a macro on each file but it will only do 1 file at a time and you must manually save each file. Converting a large amount of bulk files cannot be automated easily.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/794/original/LF_Visible.JPG?1712299617","metadata":{"caption":"Example of a file with LF line endings."}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThey're just invisible line endings! Who cares!?!?\u003c/p\u003e\n\u003cp\u003eThe Windows Githhub Desktop app becomes a huge problem if you intend to contribute to a large open source project like Adafruit's Circuit Python. Pre-commit is a normal part of the process and runs Pylint.\u0026nbsp; Pylint only accepts LF (Unix Style) EOL's and will throw thousands of CRLF line ending errors. So yes it matters, a lot.\u003c/p\u003e\n\u003cp\u003eAs you can see in the below image, any legitimate errors that Pylint raises during pre-commit gets buried in hundreds of errors for\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eThere is CRLF while it should be LF\u003c/code\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eAll due to Github Desktop creating them!\u003c/p\u003e\n      \n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/777/original/Pre-Commit-Unexpected-line-ending-errors.JPG?1712214141","metadata":{"caption":"pre-commit errors due to CRLF line endings"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eAll Github Desktop had to do is add a preference option to checkout and commit with LF only.\u0026nbsp; No such option exists.\u0026nbsp; This behavior is not present in any other Git based tool so this is a problem unique for Windows Github Desktop users.\u0026nbsp; There are workarounds published online that include changing an environment variable and global git config. That workaround only works for 1 session, as soon as you close Github Desktop it will promptly ignore your previous changes. There are hundreds of issues filed about this in the Github Desktop repo over the past decade with no real solution.\u003c/p\u003e\n\u003cp\u003eThere has to be a way to fix this!\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/783/original/PowerShell_Way.jpg?1712218995","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eOften times what cannot be done with a Windows batch script can be done with a Windows PowerShell script.\u0026nbsp; Think of PowerShell as a far more capable version of Command Prompt.\u0026nbsp; To be fully transparent I used ChatGPT to do most of the work and \u003ca href=\"https://chat.openai.com/share/4fe18cf7-4199-431f-b4de-60a8e5a2c232\" target=\"_blank\"\u003ehere is the ChatGPT Session\u003c/a\u003e. Make robot fren not robot enemy.\u003c/p\u003e\n\u003cp\u003eHere is the powershell script called \u003ccode\u003eAutoLF.ps1\u003c/code\u003e (ps1 is a powershell script extension, it has nothing to do with PlayStation).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eThere are 2 ways to use this script.\u0026nbsp;\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eDrag and drop it into a directory (making sure to uncomment $folderPath)\u003c/li\u003e\n\u003cli\u003eSpecify a directory path to run it on.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eHere I'm using Option 2 and have uncommented both $username and $folderPath lines by removing the # at the beginning of the line.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"# SPDX-FileCopyrightText: 2024 DJDevon3\n#\n# SPDX-License-Identifier: MIT\n# Attribution: ChatGPT https://chat.openai.com/share/4fe18cf7-4199-431f-b4de-60a8e5a2c232\n\n# ------------- Choose directory pathing option ----------------\n# Script will run on the directory you choose and all subdirectories within.\n\n# Option 1: Run in the same directory as this file (drag/drop/run)\n#$folderPath = $PSScriptRoot\n\n# Option 2: Set the folder path manually\n$username = $env:USERNAME\n$folderPath = \"C:\\Users\\$username\\Documents\\GitHub\\Adafruit_CircuitPython_Requests\\\"\n\n# Change to the desired directory. Uses Option 1 or 2 automatically as both use the same variable folderPath.\nSet-Location -Path $folderPath\n\n# ----------------- Gather environment info ----------------------\n$currentDate = Get-Date -Format \"yyyy-MM-dd\"\n$psVersion = $PSVersionTable.PSVersion\n\n# ----------------- Begin Script Output ---------------------------\n# echo/print version info\nWrite-Host \"Date: $currentDate\"\nWrite-Host \"PowerShell version: $($psVersion.Major).$($psVersion.Minor)\"\nWrite-Host \"\"\n\n# Get a list of .py files in the repo directory and included subdirectories\n$pyFiles = Get-ChildItem -Path $folderPath -Filter *.py -Recurse\n\nWrite-Host \"------------------------ CONVERTING LINE ENDINGS (EOL) TO LF ------------------------\"\nWrite-Host \"\"\n\n# Powershell will loop through each .py file converting CRLF to LF.\nforeach ($file in $pyFiles) {\n    # Setup ignored .py files here. 'conf.py' for example. We'e only cleaning up .py files.\n    if ($file.Name -eq 'conf.py') {\n        Write-Host \"Ignored: $($file.FullName): File named 'conf.py' is ignored.\"\n\tWrite-Host \"\"\n        continue\n    }\n\n    # Read the content of the file\n    $content = Get-Content -Path $file.FullName -Raw\n\n    # Replace \\r\\n to \\n line endings \n    $content = $content -replace \"`r`n\", \"`n\"\n\n    # Write the modified content back to the file\n    Set-Content -Path $file.FullName -Value $content\n\n    Write-Host \"EOL's converted to LF for $($file.FullName)\"\n    Write-Host \"\"\n}\n\n# Keep the PowerShell window open after completing to inspect for any errors.\nWrite-Host \"Press any key to exit...\"\n$null = $Host.UI.RawUI.ReadKey(\"NoEcho,IncludeKeyDown\")","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eSave the contents to a file named AutoLF.ps1 You can rename it whatever you want, keeping the .ps1 file extension. To execute the script simply right-click on it and choose \"Run with PowerShell\".\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/778/original/Run_with_PowerShell.JPG?1712215489","metadata":{"caption":"Running a PowerShell script is super easy!"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eIf you're used to Command Prompt being a big black terminal then say hello to the very blue PowerShell terminal.\u0026nbsp; Here you can see the script executed on the file path I specified and converted every .py (python) file from CRLF line endings to LF line endings.\u0026nbsp; Very quick and easy!\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/779/original/AutoLF_ps1_Result.JPG?1712215641","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eand the result of automated LF conversion using this method.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/793/original/LF_Visible.JPG?1712299370","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u003cstrong\u003eThe Github Desktop CRLF problem now has a 1-click solution!\u003c/strong\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/780/original/TheresMore.JPG?1712216216","metadata":{"caption":"From Simple to Advanced..."}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eWhile the simple version does fix CRLF errors there's a lot more we could do with it. We can include \u003ccode\u003epre-commit install\u003c/code\u003e, \u003ccode\u003eblack\u003c/code\u003e, \u003ccode\u003ereuse\u003c/code\u003e, and \u003ccode\u003epre-commit run -all-files\u003c/code\u003e to run with PowerShell!\u003c/p\u003e\n\u003cp\u003eHere is a script I've named \u003ccode\u003eAutoLF_Pre-Commit.ps1\u003c/code\u003e\u0026nbsp; It has the same configuration as the \u003ccode\u003eAutoLF.ps1\u003c/code\u003e but also converts other things and runs pre-commit automatically. Now you'll know your repo has cleaned up the issues introduced by Github Desktop before working on a newly cloned repo.\u003c/p\u003e\n\u003cp\u003eAll you have to do is remember to run it immediately after cloning a new repository and integrate into your normal workflow.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"# SPDX-FileCopyrightText: 2024 DJDevon3\n#\n# SPDX-License-Identifier: MIT\n# Attribution: ChatGPT https://chat.openai.com/share/4fe18cf7-4199-431f-b4de-60a8e5a2c232\n\n# ------------- Choose directory pathing option ----------------\n# Option 1: Run in the same directory as this file (drag/drop/run)\n#$folderPath = $PSScriptRoot\n\n# Option 2: Set the folder path manually\n# folderPath should be the top level repository directory, not a subdirectory.\n# good example C:\\Users\\$username\\Documents\\GitHub\\Adafruit_CircuitPython_Requests\\\n# bad example C:\\Users\\$username\\Documents\\GitHub\\Adafruit_CircuitPython_Requests\\wifi\\api\\expanded\n\n$username = $env:USERNAME\n$folderPath = \"C:\\Users\\$username\\Documents\\GitHub\\Adafruit_CircuitPython_Requests\\\"\n\n# Change to the desired directory. Uses Option 1 or 2 automatically as both use the same variable folderPath.\nSet-Location -Path $folderPath\n\n# ----------------- Gather environment info ----------------------\n$currentDate = Get-Date -Format \"yyyy-MM-dd\"\n$pythonVersion = \u0026 python --version 2\u003e\u00261\n$preCommitVersion = \u0026 pre-commit --version 2\u003e\u00261\n$blackVersion = \u0026 black --version 2\u003e\u00261\n$reuseVersion = \u0026 reuse --version 2\u003e\u00261\n\n# ----------------- Begin Script Output ---------------------------\n# echo/print version info\nWrite-Host \"Date: $currentDate\"\nWrite-Host \"Python: $pythonVersion\"\nWrite-Host \"pre-commit: $preCommitVersion\"\nWrite-Host \"black: $blackVersion\"\nWrite-Host \"reuse: $reuseVersion\"\nWrite-Host \"\"\n\nWrite-Host \"----- Attempting pre-commit install on ($folderPath) -----\"\n# This will do nothing if it's previously been run.\ntry {\n    \u0026 'pre-commit' install --install-hooks --overwrite\n} catch {\n    Write-Host \"Error installing pre-commit hooks in the directory: $_\"\n}\nWrite-Host \"\"\n\nWrite-Host \"----- PIP INSTALL --UPGRADE REUSE -----\"\n# This will do nothing if it's already up-to-date.\ntry {\n    \u0026 pip install --upgrade reuse\n} catch {\n    Write-Host \"Error upgrading reuse tool: $_\"\n}\nWrite-Host \"\"\n\n# Get a list of .py files in the repo directory and included subdirectories\n$pyFiles = Get-ChildItem -Path $folderPath -Filter *.py -Recurse\n\nWrite-Host \"------ Convert line endings to LF then format with black ------\"\nWrite-Host \"\"\n\n# Powershell will loop through each .py file converting CRLF to LF.\nforeach ($file in $pyFiles) {\n    # Setup ignored .py files here. 'conf.py' for example. We'e only cleaning up .py files.\n    if ($file.Name -eq 'conf.py') {\n        Write-Host \"Skipping file $($file.FullName): File named 'conf.py' is ignored.\"\n        continue\n    }\n\n    # Read the content of the file\n    $content = Get-Content -Path $file.FullName -Raw\n\n    # Replace \\r\\n to \\n line endings \n    $content = $content -replace \"`r`n\", \"`n\"\n\n    # Write the modified content back to the file\n    Set-Content -Path $file.FullName -Value $content\n\n    Write-Host \"EOL's converted to LF for $($file.FullName)\"\n\n    # Run black code formatter on the file\n    try {\n        \u0026 'black' $file.FullName\n    } catch {\n        Write-Host \"Error running black for $($file.FullName): $_\"\n    }\n}\n\n# Add a blank line\nWrite-Host \"\"\n\nWrite-Host \"------------- PRE-COMMIT RUN --ALL-FILES -------------\"\n# Since all py files have already been changed to LF and formatted \n# there shouldn't be hundreds of line-ending errors on pre-commit.\n# Pre-commit runs on all files in the repo not just py files\ntry {\n    \u0026 'pre-commit' run --all-files\n} catch {\n    Write-Host \"Error running pre-commit for files in $($folderPath): $_\"\n}\nWrite-Host \"-------------------------------------------------------------------------\"\n\n# Pause at the end to keep the PowerShell window open\nWrite-Host \"Press any key to exit...\"\n$null = $Host.UI.RawUI.ReadKey(\"NoEcho,IncludeKeyDown\")","metadata":{"language":"terminal","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u003cstrong\u003eThe result is a repo with .py files completely cleaned of Github Desktop CRLF files then run with black and pre-commit.\u003c/strong\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eNo more hundreds (or thousands) of CRLF errors when running pre-commit.\u0026nbsp; This is the very satisfying result.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/781/original/AutoLF-Pre-Commit_ps1_Result.JPG?1712217014","metadata":{"caption":"pre-commit green across the board"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eIf you're worried about all these line endings changing files that will then be added to your commit don't be!\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/784/original/EOL_Fake_Commit.JPG?1712220813","metadata":{"caption":"EOL/Whitespace changes only do not count as actual file changes!"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eClick on Commit and you'll find that Github Desktop will act like it will submit the changes at first. This is a hair raising experience (if it's not your personal repo) that you're going to add a bunch of changes you didn't want to!\u0026nbsp; Not to worry, they won't actually commit as you'll see.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/785/original/EOL_Fake_Commit_2.JPG?1712220866","metadata":{"caption":"Github Desktop has its own pre-commit if you set it up correctly."}},{"element_type":"text","content":"\n        \u003cp\u003eAs long as your commits are white space or EOL changes only they will not actually commit.\u003c/p\u003e\n\u003cp\u003eIt will not throw an error but the message in the center of the screen will change to\u0026nbsp;\u003ccode\u003eNo content changes found\u003c/code\u003e\u003c/p\u003e\n      ","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/786/original/EOL_Fake_Commit_3.JPG?1712221045","metadata":{"caption":"No content changes found"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eYou can optionally choose the gear icon in the top right (only appears during a commit) and select\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eHide whitespace changes\u003c/code\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/790/original/EOL_Fake_Commit_4.JPG?1712221345","metadata":{"caption":"Choose Hide whitespace changes"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThen it will recognize there are no file changes other than whitespace or EOL changes and throw an error\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eThere are no changes to commit\u003c/code\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/788/original/EOL_Fake_Commit_6.JPG?1712221235","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eGithub Desktop will then automatically remove all the files that were just in your commit because they're EOL changes only.\u0026nbsp; They vanish.\u0026nbsp; Then Github Desktop reloads you back to your repo main screen (home) and all is right with the world again.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/791/original/EOL_Fake_Commit_7.JPG?1712221569","metadata":{"caption":"Back to normal after the whitespace only file changes are removed automatically."}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThis is a typical commit workflow for a Github Desktop user. Now that you're armed with the AutoLF powershell script you can remove all the obstacles that have prevented you from making easy pre-commits and keeping your workflow efficient and productive.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eGithub Repository: \u003ca href=\"https://github.com/DJDevon3/WindowsPowerShellScripts\"\u003eDJDevon3's WindowsPowerShellScripts\u003c/a\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}}]