# End of line whitespace & git

**URL:** <https://discourse.julialang.org/t/end-of-line-whitespace-git/26544>\
**Category:** Tooling\
**Tags:** question\
**Created:** [July 19, 2019, 1:31pm UTC](https://discourse.julialang.org/t/end-of-line-whitespace-git/26544 "2019-07-19T13:31:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 19, 2019, 1:31pm UTC](https://discourse.julialang.org/t/end-of-line-whitespace-git/26544/1 "2019-07-19T13:31:18Z")

</div>

I would like to ask if there is a robust and/or recommended solution for stripping EOL whitespace of Julia code in Git repos, more or less automatically, before commits.

I read a bit about various solutions, and there are various pre-commit hooks floating around on the net, but I am not sure which one to choose/adapt to Julia.

This is for use in a multi-user team, for my personal use I have Emacs do this automatically. But I would also consider enabling it for public repos, so that PRs I get don’t have spurious whitespace changes.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [July 19, 2019, 9:36pm UTC](https://discourse.julialang.org/t/end-of-line-whitespace-git/26544/2 "2019-07-19T21:36:07Z")

</div>

Not exactly what you’re asking, but in julia repository there is this script to check whitespace: [https://github.com/JuliaLang/julia/blob/master/contrib/check-whitespace.sh](https://github.com/JuliaLang/julia/blob/master/contrib/check-whitespace.sh)
