 
   defp latest_tag(working_dir) do
     case System.cmd("git", ~w"rev-list --tags --max-count=1", cd: working_dir) do
+      {"", 0} ->
+        nil
+
       {latest_tag_sha1, 0} ->
         case System.cmd("git", ~w"describe --tags #{latest_tag_sha1}", cd: working_dir) do
           {tagname, 0} -> String.trim(tagname)

      """

      Alternatively, you can use `diff` to only show the issues that were introduced after a certain tag or commit:

      """,
      :cyan,
      String.pad_trailing("    mix credo diff #{latest_tag} ", @command_padding),
      :faint,
      "# use the latest tag",
      "\n\n",
      :reset,
      :cyan,
      String.pad_trailing(

      :reset,
      """

      Introducing code analysis to an existing codebase should not be about following any
      "best practice" in particular, it should be about helping you to get to know the ropes
      and make the changes you want.

      Try the options outlined above to see which one is working for this project!
      """
