Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop storing history of specific file/directory

esmoley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 13, 2019

I have a specific directory storing big executive files (other built projects) that are changing constantly and when those files are changing, my repository size increases to the size of files that were changed. I need to stop saving those files in history. I tried to mark directory binary in .gitattributes file, but that didn't work. Any suggestions?

1 answer

0 votes
Joao Sgreccia
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 13, 2019

Hi @esmoley

You can migrate those big files to Git LFS with BitbucketFiles uploaded to LFS only count against your LFS usage; they don't count against the repo size limit.

Let me know if you have any further questions

esmoley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2019

Yeah. This option helped to separate these big files apart of the main project. It moved a folder with those files to Git LFS, but each update keeps the history of those files which increases its size. In ".gitattributes" I added

public/files/* filter=lfs diff=lfs merge=lfs -binary

 Firstly there was -text instead of -binary, but with that setting, capistrano downloads text pointers instead of the actual files.

So, the problem still persists, but now it in GIT LFS.

Maybe I am doing something wrong?!

Joao Sgreccia
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2019

Hi @esmoley . 


Sorry but Git isn't designed for backups like this and there isn't any out of the box solution for this scenario. Git LFS will provide a way to track these without compromise your repository size, however, it will count against the LFS usage.

Let me know if I can provide any help.

PS 

One way to accomplished that is to have a separate repository containing this files and every time you need to update them use a git commit --amend followed by a git push ---force-with-lease. Be cautious :) as you are not going to keep any history of this files

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events