Incorrect Git LFS Directory Tracking Pattern in Documentation

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      In https://www.atlassian.com/git/tutorials/git-lfs "Tracking files with Git LFS," one of the patterns is:

      # track all files in the Assets directory and all subdirectories
      $ git lfs track "Assets/"
      

      However, "git help attributes" states:

      The rules by which the pattern matches paths are the same as in .gitignore files (see gitignore(5)), with a few exceptions:

      • Negative patterns are forbidden.

      • Patterns that match a directory do not recursively match paths inside that directory (so using the trailing-slash path/ syntax is pointless in an attributes file; use path/* instead).*

      Testing revealed that the command should be changed to:

      git lfs track "Assets/**"
      

      Please update the documentation accordingly.

      Steps to Reproduce

      git lfs track "Assets/"
      

      Expected Results

      Git should track the directory and its subdirectories.

      Actual Results

      Git only tracks the current directory.

      Workaround

      Use the command below instead:

      git lfs track "Assets/**"
      

            Assignee:
            Robert Klimkiewicz
            Reporter:
            Gustavo Saviano Silva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: