Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.