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 votes
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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

402 views 5 9
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