> For the complete documentation index, see [llms.txt](https://cctang.gitbook.io/softwarecrafting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cctang.gitbook.io/softwarecrafting/tools/git/addressing_common_errors.md).

# Addressing common errors

## Windows file ending (crlf) and Unix file ending (lf) incompatibilty

```bash
git config --global core.eol lf
git config --global core.autocrlf input
git rm -rf --cached .
git reset --hard HEAD
```

## Upgrade to macOS breaks git

On macOS, git is attached to XCode’s command line tools. It needs to be updated whenever macOS is upgraded.

```
xcode-select --install
```

## References

* [Parse errors due to ^M end of line](https://github.com/robbyrussell/oh-my-zsh/issues/4870)
* [How do I force git to use LF instead of CR+LF under windows?](http://stackoverflow.com/questions/2517190/how-do-i-force-git-to-use-lf-instead-of-crlf-under-windows)
* [xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun](http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/)
