Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Lint

Git Lint

A linter and coding buddy for enforcing consistent Git commits. Git Lint ensures you maintain a clean, easy to read, and debuggable project history that is a joy to work with.

E0e036f89c14b3e59640318eedf9670b?s=128

Brooke Kuhlmann

April 11, 2021
Tweet

Transcript

  1. Git Lint Presented by Brooke Kuhlmann

  2. A Non-Descriptive History 27c7c6211aa1 ok, this works 3a0843a69fd6 Do the

    right thing e00e9ebc358c Simplify 74f9dfdac814 I give up 7eca44a9c9bf hack b3eee2292be7 start
  3. A Non-Descriptive History 27c7c6211aa1 ok, this works 3a0843a69fd6 Do the

    right thing e00e9ebc358c Simplify 74f9dfdac814 I give up 7eca44a9c9bf hack b3eee2292be7 start ⁉ ⁉ ⁉ ⁉ ⁉ ⁉
  4. A Non-Descriptive History 27c7c6211aa1 ok, this works 3a0843a69fd6 Do the

    right thing e00e9ebc358c Simplify 74f9dfdac814 I give up 7eca44a9c9bf hack b3eee2292be7 start ⁉ ⁉ ⁉ ⁉ ⁉ ⁉ 🚫
  5. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest.
  6. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Subject
  7. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Subject (what)
  8. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Subject Body (what)
  9. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Subject Body (what) (why)
  10. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest.
  11. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Fixed Added Updated Removed Refactored
  12. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest.
  13. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. 72 characters
  14. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Space
  15. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. Capitalization
  16. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. 72 characters
  17. Anatomy of a Good Commit Added table of contents to

    README Received feedback that the README was hard to navigate. With a Table of Contents, people are able to quickly scan what the README provides and immediately jump to a topic of interest. actually basically furthermore however obviously of course ...etc... 🚫
  18. Readable Git History 📖

  19. Readable Git History Added gem skeleton 📖 📄 Added initial

    architecture and implementation 📄 Added command line interface 📄 Refactored private API 📄 Updated README table of contents 📄
  20. Team E ffi ciency 🕵 🕵 🕵

  21. Team E ffi ciency 🕵 🕵 🕵 1 hour 1

    hour 1 hour
  22. Team E ffi ciency 🕵 🕵 🕵 1 hour 1

    hour 1 hour 3 hours 😢
  23. Git Lint https://www.alchemists.io/projects/git-lint

  24. Your automated coding buddy! Git Lint https://www.alchemists.io/projects/git-lint

  25. Getting Started gem install git-lint Installation: https://www.alchemists.io/projects/git-lint

  26. Getting Started gem install git-lint Installation: git switch <branch> Usage:

    https://www.alchemists.io/projects/git-lint
  27. Getting Started gem install git-lint Installation: git switch <branch> Usage:

    git-lint --analyze https://www.alchemists.io/projects/git-lint
  28. Git Hook Support .git/hooks/commit-msg 📄 https://www.alchemists.io/projects/git-lint

  29. Git Hook Support .git/hooks/commit-msg 📄 #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint

  30. Git Hook Support .git/hooks/commit-msg 📄 set -o nounset set -o

    errexit set -o pipefail IFS=$'\n\t' #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint
  31. Git Hook Support .git/hooks/commit-msg 📄 set -o nounset set -o

    errexit set -o pipefail IFS=$'\n\t' if ! command -v git-lint > /dev/null; then printf "%s\n" "[git]: Git Lint not found. To install, run: gem install git-lint." exit 1 f #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint
  32. Git Hook Support .git/hooks/commit-msg 📄 set -o nounset set -o

    errexit set -o pipefail IFS=$'\n\t' if ! command -v git-lint > /dev/null; then printf "%s\n" "[git]: Git Lint not found. To install, run: gem install git-lint." exit 1 f git-lint --hook --commit-message "${BASH_ARGV[0]}" ⭐ #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint
  33. Git Hook Support .git/hooks/commit-msg 📄 set -o nounset set -o

    errexit set -o pipefail IFS=$'\n\t' if ! command -v git-lint > /dev/null; then printf "%s\n" "[git]: Git Lint not found. To install, run: gem install git-lint." exit 1 f git-lint --hook --commit-message "${BASH_ARGV[0]}" ⭐ #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint
  34. Git Hook Support .git/hooks/commit-msg 📄 set -o nounset set -o

    errexit set -o pipefail IFS=$'\n\t' if ! command -v git-lint > /dev/null; then printf "%s\n" "[git]: Git Lint not found. To install, run: gem install git-lint." exit 1 f git-lint --hook --commit-message "${BASH_ARGV[0]}" ⭐ #! /usr/bin/env bash https://www.alchemists.io/projects/git-lint
  35. Git Commit Work fl ow git commit https://www.alchemists.io/projects/git-lint

  36. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 https://www.alchemists.io/projects/git-lint
  37. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 Subject https://www.alchemists.io/projects/git-lint
  38. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 Subject Body https://www.alchemists.io/projects/git-lint
  39. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 🚫 https://www.alchemists.io/projects/git-lint
  40. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  41. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  42. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  43. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  44. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  45. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  46. Git Commit Work fl ow git commit Did some stu

    ff fi nished discussed work 📄 8790d748e650 (Brooke Kuhlmann, 0 seconds ago): Did some stu ff Commit Body Leading Line Error. Use blank line between subject and body. Commit Body Paragraph Capitalization Error. Capitalize fi rst word. Line 2: " fi nished discussed work" Commit Subject Pre fi x Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/. 1 commit inspected. 3 issues detected (0 warnings, 3 errors). 🚫 https://www.alchemists.io/projects/git-lint
  47. Customizable Con fi guration Analyzers • Commit Author • Commit

    Body • Commit Subject • Commit Trailer https://www.alchemists.io/projects/git-lint
  48. Customizable Con fi guration Analyzers • Commit Author • Commit

    Body • Commit Subject • Commit Trailer Enablement ✅ On 🚫 Off https://www.alchemists.io/projects/git-lint
  49. Customizable Con fi guration Analyzers • Commit Author • Commit

    Body • Commit Subject • Commit Trailer Severity ⚠ Warning ❌ Error Enablement ✅ On 🚫 Off https://www.alchemists.io/projects/git-lint
  50. Customizable Con fi guration Analyzers • Commit Author • Commit

    Body • Commit Subject • Commit Trailer Severity ⚠ Warning ❌ Error Enablement ✅ On 🚫 Off Regular Expressions ⭐ https://www.alchemists.io/projects/git-lint
  51. Continuous Integration Support https://www.alchemists.io/projects/git-lint

  52. Continuous Integration Support Circle CI https://www.alchemists.io/projects/git-lint

  53. Continuous Integration Support Circle CI Netlify https://www.alchemists.io/projects/git-lint

  54. Continuous Integration Support Circle CI Netlify Travis CI https://www.alchemists.io/projects/git-lint

  55. Continuous Integration Support Circle CI Netlify Travis CI https://www.alchemists.io/projects/git-lint GitHub

    Actions
  56. https://www.alchemists.io/projects/git-lint Git Lint

  57. Thanks 🙇 https://www.alchemists.io