How do I make a complete copy of a Git repository including its metadata (PRs, issues, etc.)

I am starting to use LFS to track *.dat files in my repository. Unfortunately, there has been several *.dat files already tracked by Git in my whole history. I searched online and saw that I would need to clean the history and overwrite the whole repository on the server with the cleaned one. 

Before I do that, I would like to have a complete copy of my existing repository, including all the metadata (especially Pull Requests), so that if I accidentally caused any permanent damages, I could start over from where it was.

A mere "clone --mirror" seems not enough. It keeps all the Git history, but not the metadata. I was wondering if BitBucket provides any functionalities for copying the metadata as well, or if there are any suggested practices in my situation.

 

1 answer

0 vote
Brant Schroeder Community Champion May 25, 2017

Lei,

At this time this cannot be done.  There is a feature request here BSERV-4586 that you can vote for.  In the mean time you will need to perform a backup and restore to accomplish what you are trying to do.

Information on backup and restoring bitbucket can be found here.

Brant

Hi Brant,

Thank you so much for your answer! 

I guess this feature is indeed a great addition to the current BitBucket services. I am looking forward to it.

For now, I think I'll just proceed with care.

Thank you very much!

Lei

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,760 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