Does stash provide any mainteance for the git repos (gc/fsck/etc)?


We are evaluating stash and have used git internally for a few years. Currently, we have some automation that runs

git gc --auto


git fsck --strict

to maintain/optimize our repos. Does stash provide anything like or does Atlassian have any recommendations?

Are the actual *.git directories available on the stash server for running commands like this?



3 answers

1 accepted

0 vote
Seb Ruiz Atlassian Team Dec 04, 2012

Hi Garret,

Check out this plugin I wrote just a couple of days ago - it allows you to trigger GC either from rest or from the UI.

It doesn't have support for triggering fsck, but I could add that in if you need it. How would you expect that to run?


Alternatively yes, you can log into the Stash instance and run the commands yourself. The repositories' bare clones are stored in the STASH_HOME directory.

Thanks Seb - I'll check out the plugin. I need to upgrade to stash 2.0 first :)

We just run fsck as mentioned above on a weekly basis.

2 votes
Roger Barnes Atlassian Team Mar 25, 2015

We're planning on retiring the ops plugin in the near future. Stash automatically takes care of periodic garbage collection and optimisation, so you don't have to.



I've installed the plugin on Stash 3.2.1 and I got "HTTP Status 400 - HTTP method POST is not supported by this URL" when I click on trigger gc ...

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

712 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot