How to make a complete copy of a 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

Hi Lei,

This is actually an existing feature request that you can find at BSERV-4586. One thing to note is that the database does include the pull requests:

The database, which contains data about pull requests, comments, users, groups, permissions, and so on. In addition, the clone contains the files and metadata that Git requires to maintain the changes you make to the source files.

It looks like the easiest way to get all the data back is to perform the backup and restore per BSERV-4586. I would encourage you to vote on BSERV-4586 and add any comments you believe will benefit the developers.

Hopefully that helps!

Cheers,

Branden

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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

233 views 0 6
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