Does Stash write a log entry when someone does a git push --force?

We've got a dev team that is claiming that Stash lost a bunch of commits that they did over a two week period. My guess is that someone did a push --force as they didn't have the pre-receive hook enabled on their repo.

To confirm that theory is there a Stash logfile entry that I can search for that is specific to pushes that are forced?

2 answers

1 accepted

I started work on a plugin that would add audit records about force pushes, but got busy with other things. I hope to get some free time to get back to working on it.

In the meantime, you can vote for STASH-4204

Hi Mike,

Unfortunately not. If you're using 2.11 we've started to record those pushes in the database by default (to be surfaced in a later version with any luck). The table in question is sta_repo_push_activity if that helps?

Cheers,

Charles

We're running 2.11 now, but I think we upgraded AFTER the force push in question. I'll check.

Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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...

1,737 views 1 5
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