Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a big git repo with some old folders in there. i dont need them in my master branch and they are a little bit annoying there but i dont want to loose the data, so archiving would be great. now i miss a feature (or i dont know it yet) which can move them to a seperate branch or something in that way... it would be nice to see only my needed folders in the master branch and have another branch "archive" for all the old stuff... i know that branches are not made for this, so may there is another way? Also i dont want to tar these folders, so it would be great to have them not compressed.

share|improve this question
up vote 2 down vote accepted

You could take your master branch and branch it off into "archive", pull the "archive" branch, delete the files and folders you don't want in there then go back to your master branch and delete the files and folders you kept in the "archive" branch.

share|improve this answer
mh yes that was also my first idea, so is there nothing else builtin? – reox Sep 6 '11 at 19:17
Not that I know of, unless you want to create a tag to be able to pull those folders out after they were deleted, but with a branch you could probably merge other branches into it when you want to add more to the archive branch. – Nexerus Sep 6 '11 at 19:21
okay, so how i move now a folder in my archive branch? git checkout archive; git checkout <myfolder> master; git commit -am "<...>"; git checkout master; git rm <myfolder>; git checkout -am "<...">; ? – reox Sep 6 '11 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .