jedbrown / git-fat

Simple way to handle fat files without committing them to git, supports synchronization using rsync
BSD 2-Clause "Simplified" License
621 stars 137 forks source link

Questions about .gitfat and .gitattributes files. #50

Closed lolobibi closed 10 years ago

lolobibi commented 10 years ago

Hi,

First, I would like to express my appreciation over your work. I am currently using git-fat in the context of my company: we are using github enterprise rather happily, though, we experienced recently some issues with some repos storing large binary file (in our case .fla). We are attempting to integrate git-fat in our workflow, we first stumbled over the issue that [rsync] always prompts the password request, but we got that fixed.

Now, I would like to ask you two questions:

  1. The properties file .gitfat specifies the remote location where to store 'the fat' but also the sshuser to connect as when accessing the remote repos. The .gitfat file is living within the project and hence is being commit and pushed to the normal git repos. I think this set-up is not ideal as it mixes up two different concepts: the location and the id to access it. The first one is common to any user working on the project and it makes absolutely sense to have it shared (its defines where the project store its "fat"), though, on the other hand, the sshuser is a pseudo private piece of data that varies according to who works on the project, it should not be commit/pushed to the repos. Looking into the git-fat script (from a non python coder eye), I could spot and modify where the sshuser is fetched and replace it by 'os.getlogin()', that suits my need as the value returned is the same as the one I use as sshuser on the remote location, but this is not ideal neither since it could be different. So, another way would be to obtain the sshuser from a global .gitfat config file that would live on the home directory, which once again, is not perfect, since there could be several project using git-fat, that push to different location using different sshuser. So, to conclude, my question would be a mix of: what would you recommend doing? do you plan on doing something for this issue?
  2. The .gitattributes file list the the filters, aka the file types to consider as "fatty". I think this is quite suited for this file to live where it does. I was though wondering about the notion of path. As a use case, let's consider that I have in my project some png files living in different folder, I would like to filter them by their location, I want to "git-fat" all png's living in the design folder, but not the ones living in the production folder. Do you reckon that would make sense to make the .gitattributes a bit more flexible ?

Thanks for your attention, looking forward reading you. Cheers,

jedbrown commented 10 years ago
  1. I use ~/.ssh/config to set the user, but someone really wanted a way to set it in .gitfat. This may suit workflows where a special restricted ssh account is set up for accessing those files and the ssh keys from the entire team are authorized. I recommend not setting ssh_user in your ~/.gitfat.
  2. Globbing is allowed. See gitattributes(5).
lolobibi commented 10 years ago

Thanks a lot for your reply, that really helps, sounds like solutions and opens my eyes to new things to try and learn. Much appreciated!