Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Retaining history from old repos

Devin Quince July 29, 2013

We are looking at using Stash to help us cleanup our repositories and are wondering if it possible to save the history in this situation

Current situation

13 seperate repos with history, branches, etc

We want to combine this into 1 repo with the old repos as folders under it and use Stash to make a project with this new single repo. Our question is there a way to retain the old history, branch info from the old repos in this new repo or do we lose it all?

1 answer

1 accepted

0 votes
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

Hi Devin,

You most certainly can keep your history. This is really a Git question, nothing related to Stash (might help your Googling).

My advice would be to look at git subtree. It allows you extract (and combine) subfolders to/from a repository.

git subtree add --prefix sub/dir/path https://your/repo.git master

You could also use something like git filter-branch to rewrite the history, but that might be a little more advanced.

Cheers,

Charles

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events