Hi, thanks for your quick reply
.
Yes that is the idea, but I think bundling only the master branch is easiest. Probably most of the data is in there, and that way it could be used for those who just want the master branch, as well as those who want to clone the whole repo.
I've never used git bundles before either, so I did some research (and some testing on one of my other repos), and came up with the following process.
TO CREATE A BUNDLEAs long as it contains most of the data, that's good enough, so it can probably just be of the master branch:
git bundle create ufoai.bundle master
This will create a bundle containing all the commits in the master branch. It can be updated if a lot of data gets added, but as long as it has the bulk of the repo that's probably fine.
TO USE THE BUNDLE TO CLONE THE GIT REPO (summary at the bottom)
Assuming you have the ufoai.bundle file in your current directory:
git init ufoai
cd ufoai
git pull ../ufoai.bundle master
This will pull all the commits up until whenever the bundle was created, and put them in the 'master' branch of the new repo.
Now we want to link to the actual repo, and bring our copy up-to-date with it.
If all we want is the master branch, we can do
git remote add origin git://git.code.sf.net/p/ufoai/code --track master
git pull
but if we want to be able to track all the branches, it's better to do
git remote add origin git://git.code.sf.net/p/ufoai/code
git fetch
git merge origin/master
and then to set the default upstream for pulling and pushing.
git branch --set-upstream-to origin/master
At this point you can see all the remote branches with
git branch -r
unless you used '--track master', in which case you have to manually add any branches you want to see with
git remote set-branches --add origin <branchname(s)>
git fetch
now assuming 'git branch -r' shows everything you want, and has exactly one branch with the name you want to work on, you can switch to and track any of the existing remote branches with 'git checkout'. For example
git checkout renderer_work
would be shorthand for 'git checkout -b renderer_work --track origin/renderer_work'
SO TO SUMMARIZE:OPTION A: MASTER ONLYgit init ufoai
cd ufoai
git pull ../ufoai.bundle master
git remote add origin git://git.code.sf.net/p/ufoai/code --track master
git pull
-> should be up-to-date and tracking master, patch away
OPTION B: WHOLE REPOgit init ufoai
cd ufoai
git pull ../ufoai.bundle master
git remote add origin git://git.code.sf.net/p/ufoai/code
git fetch
git merge origin/master
git branch --set-upstream-to origin/master
-> up-to-date, tracking master, and can check out and work on other branches.
For reference, another project which uses a git bundle for their data is FlightGear:
http://wiki.flightgear.org/Git