Details :
- We are trying to migrate our repo to git LFS
- I have a branch that will enable git lfs, what I am doing is updating a .gitattributes file, and creating a tracker which in turn created pointers to track all the files that need to be part of the LFS
- Now I would have to advise the developers what they need to do once this feature branch is to merged into the default/master
The problem that I need to understand?
- Now what I have advised and found in general is before updating to the master/default, ie, rebasing to master/default, I told them to do the below for all the feature branches that they have which obviously till this point do not have the git lfs changes in them
brew install git-lfs (this will be system-wide)
git lfs install (this will be on the root directory of the repo, for each branch)
- Now for the devs, this will be a manual step, and they somehow want this to be automated for them, which I assume may be done through git hooks, or some other way so that they do not have to update every branch I am thinking of a plumbing bash command as such might do it? Is this feasible
for branch in $(git for-each-ref --format='%(refname)' refs/heads/); do
git lfs install "$branch";
done
Update1
- Seems the above does do
git lfs installon all the branches that you have in your local history and does it in one time. - But I would still want to know and understand what is
bestpractice