Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to track a single file or a directory in git-lfs Edited

The context menu only has the option to add a complete file type. Online, I also only find ways to add complete file types to lfs.

From the look of it, it seems that it should be possible to use more specific patterns for folders / subfolders / filetypes, but I can't get that to work; lfs only ever works if it's really only a "*.mytype" declaration.

In some cases, I really want to track some specific folders and files in LFS while others of the same filetype should live in regular git land. Specifically, the ".asset" extension in Unity is used for a ton of things ranging from simple, text-readable ScriptableObjects (which should live in git land) to texture arrays with a size of several hundred MB (that's for LFS then).

Edit/Addendum: seems I can workaround by having a "fake" extension like ".lfs.asset", which I can manually add to the .gitattributes file. Also, I figured that sometimes (not always) directory pathes seem to work, as long as they don't contain any spaces and thus don't need any "" or '' in the .gitattributes file... but that's more of a workaround than a real solution, so please chime in if you know more!

1 answer

0 votes
minnsey Atlassian Team Apr 30, 2019

Hi

Your best bet is probably reaching out to the LFS community directly https://github.com/git-lfs/git-lfs?utm_source=gitlfs_site&utm_medium=source_link&utm_campaign=gitlfs

Why is that? Just because I can work around some missing UI pieces / functionality in SourceTree doesn't mean that the UI is good...

 

At least, please consider this a feature request to provide more than just "track file type" in the SourceTree UI.

minnsey Atlassian Team Apr 30, 2019

Apologies I thought you meant that the directory patterns you manually added sometimes worked.

you can raise feature requests at https://jira.atlassian.com

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,018 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you