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

Lei Shi May 25, 2017

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

Lei Shi May 29, 2017

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
TAGS
AUG Leaders

Atlassian Community Events