issue with history

This question is in reference to Atlassian Documentation: Frequently Asked Questions

i committed some changes in a file , it was successfully committed. but after some day i see those commit was not there and commit history was also not there, is there any command that can delete the commit history. And also who deleted the committed history  can i know it?

1 answer

The only way to delete a commit is to do a force push (git push -f) of a history that doesn't include it.

You can prevent this on specific branches under "Branch Permissions".  I think that best practice is to disallow force pushes (or "rewriting history") on long-lived branches such as master and (if you use it) develop.

I'm not sure that there's a specific way to see who did the force push, but I'd be suspicious of the authors of any commits made after yours. 

can you please provide me screenshot for Branch Permissions" or "rewriting history" setting

Screen Shot 2016-06-02 at 9.01.59 AM.png

Screen Shot 2016-06-02 at 9.02.48 AM.png

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

28,456 views 26 12
Join discussion

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