SVN to Git migration: Only import certain branches and history -


My team is preparing to move to the team and we want to start with a small repository. Due to hundreds of binary files and version branches, the initial git reserves created by git-svn are approximately 10 GB.

Large files are easy to clean, difficult part appears in the number of branches.

For GIT migration, we want to start with certain (X) only fixed (latest) branches. We do not have "trunk" - but rather different version branches which have been maintained in the long run:

---- Version 1 ------- ------------- ---- \ ---------- version 2 -------------- \ ----- ---- Version 3 ----

My question:

How can we remove?

I easily found out how to clear big blobs from history (BFG, GIT filter-branch). All the branches except the specific people to so that we only call the branch "version 3" in the latest repository? Ideally, we would like to start, where this branch was created:

  --------- version 3 ----  

Is this any way to do this with git filter-branch or any other possibility?

import the entire repository into the git, and then throw those branches that you are not interested in. Are there.

Throwing will be interesting: How can we throw them off and eliminate them from repo history?

OK, the way GIT works, branches are committed within the history of the repository branches are present because those points are present to indicate them if you remove points If so, the branches disappear. And if someone does not tell other things, then the commodity is essentially removed from the repository.

There is another prominent thing next to the branches, which generally indicate and stay around: depending on them, the history of the new Git is a large esical tree in which every committed mother It tells the father that it is committed. Until that time, no branch is clearly paying attention to them, even then the old commands remain around them; And by it, the whole history works.

So if you want to get rid of a whole line of cuttings (a separate branch), and those committees have not been merged at any point in any other branch, then all you need to do That he removed the branch from the repository. Then, nothing will point to the line of command and when you get garbage, they will be removed: GIT branch- d version: GIT branch-D version 2 GIT GC - Prune = now

This will remove branches version_1 and version_2 from the repository, and later garbage collection will be run, which will remove each item. The repository in which no indicator indicates.

After this, you have left the entire history for Version_3 , along with those parts of the other two versions, which are a part of its history if you If you want to delete, you can apply the explained method to remove the old history before the branch point of version 3.


Comments