Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19863

Incorrect Git LFS Directory Tracking Pattern in Documentation

      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/**"
      

          Form Name

            [BSERV-19863] Incorrect Git LFS Directory Tracking Pattern in Documentation

            There are no comments yet on this issue.

              a803384f6b1d Tomasz Prus
              0d126627ee05 Gustavo Saviano Silva (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: