A couple of points.
To get a complete bundle use the --all option.
Having only aked for one branch, that was all you got, and it looks like
it wasn't the current HEAD at the time, so HEAD wasn't included in the
bundle - hence the warning (but not an error ;-) when you cloned from
the bundle. (but it still left you without anything checkedout)
So at that point you have a single branch (in your remotes), no head and
your remote is the bundle you cloned from, which is what the stat.info
is confirming. So just a little confusion that's all.
At that point you then do you update your remote config (there are
command that will set the various remote/config values), and then git
fetch to get the remainder that you were missing. Then finally you need
to update your HEAD by checking out a specific branch.
Philip
----- Original Message -----
From: "shirish शिरीष" <shirisha...@gmail.com>
To: "git-users" <git-users@googlegroups.com>
Sent: Friday, September 20, 2013 9:00 PM
Subject: [git-users] <query> git unbundle, getting correct HEAD and
branches again.
Hi all,
This is going to be a longish one. Newbie here. I had been trying ages
to clone a repo. but each time it failed (the famous or infamous
remote held up issue) . The issue has been mostly at my side with an
unstable network and had to give it up.
The repo. in question is/was
https://github.com/clintbellanger/flare-game
So after sometime I came to know about git-bundle and asked a person
who had the full repo. along with access to a server where he could
upload and I could download either via wget or rsync the bundle.
The bundle was created by this command :-
$ git bundle create flare-game.bundle master
I do not know if this was the correct command or not but this was the
command that produced a half a gig (558 MB to be exact) bundle and put
on a server somewhere.
Naturally, I downloaded the bundle.
The first thing I did was verify the bundle as given in the man-page
very simplistically. Dunno if this was the right way to go for it or
not.
:~/games$ git bundle verify flare-game.bundle
The bundle contains this ref:
e91152cefbb4fee50351ed2664f0d605f38e9fb1 refs/heads/master
The bundle records a complete history.
flare-game.bundle is okay
so it seems/ed okay.
Then looked at resources on the net and unbundling seemed easy enough so
did :-
:~/games$ git clone flare-game.bundle
Cloning into 'flare-game'...
Receiving objects: 100% (29726/29726), 557.97 MiB | 32.76 MiB/s, done.
Resolving deltas: 100% (19887/19887), done.
Checking connectivity... done
warning: remote HEAD refers to nonexistent ref, unable to checkout.
As can be seen it says something about the HEAD being not right.
$ gi
== Remote URL:
origin /home/shirish/games/flare-game.bundle (fetch)
origin /home/shirish/games/flare-game.bundle (push)
== Remote Branches:
origin/master
== Local Branches:
== Most Recent Commit
fatal: bad default revision 'HEAD'
Type 'git log' for more commits, or 'git show' for full commit details.
The 'gi' is nothing but a git-info.sh (shell script) made by somebody
named Duane Johnson .
See http://justamemo.com/2009/02/09/git-info-almost-like-svn-info/
Hopefully a command comes out in the near future so that I don't have
to depend on on this shell script but that's another topic.
Anyways, as can be seen it also said something about bad 'HEAD'.
the Remote Origin was being pointed out to the bundle rather than the
actual repo.
Went to the hidden .git directory and changed the config file so it read
:-
~/games/flare-game/.git$ cat config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/clintbellanger/flare-game.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
changes were done both to the url and fetch manually.
And then did a gi again :-
~/games/flare-game$ gi
== Remote URL:
origin https://github.com/clintbellanger/flare-game.git (fetch)
origin https://github.com/clintbellanger/flare-game.git (push)
== Remote Branches:
origin/master
== Local Branches:
* master
== Most Recent Commit
commit e91152cefbb4fee50351ed2664f0d605f38e9fb1
Merge: 85f535e 044d946
Author: Justin Jacobs <jajdorks...@gmail.com>
Date: Sat Aug 24 05:46:10 2013 -0700
Merge pull request #350 from stefanbeller/master
Correct the option 2 for playing the game without installing
Type 'git log' for more commits, or 'git show' for full commit details.
Now as nothing has been committed for 1 month did not get anything
other than the following :-
:~/games/flare-game$ git pull origin master
From https://github.com/clintbellanger/flare-game
* branch master -> FETCH_HEAD
Already up-to-date.
What was interesting however that it showed only 1 remote branch were
I knew that there had been quite a few releases and quite a few
branches which the project had.
So did :-
~/games/flare-game$ git fetch
remote: Counting objects: 256, done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 161 (delta 96), reused 130 (delta 65)
Receiving objects: 100% (161/161), 71.71 KiB | 90.00 KiB/s, done.
Resolving deltas: 100% (96/96), completed with 42 local objects.
From https://github.com/clintbellanger/flare-game
* [new branch] branch0.17 -> origin/branch0.17
* [new branch] branch0.18 -> origin/branch0.18
* [new branch] empyrean -> origin/empyrean
* [new tag] v0.14 -> v0.14
* [new tag] v0.15 -> v0.15
* [new tag] v0.16 -> v0.16
* [new tag] v0.17 -> v0.17
* [new tag] v0.17.1 -> v0.17.1
* [new tag] v0.18 -> v0.18
So we have some tags and some branches.
Now I'm a bit unsure whether the way I went about it was proper or
not. esp. about the cloning and changing the HEAD manually (via the
config file).
If I did any mistakes and I could have done it better please share how
. Also please do not be generic but be rather precise so I know what I
did wrong and I could also use to understand the workflow better.
The specifics :-
Remote
https://github.com/clintbellanger/flare-game
local :-
in ~/games - the repo. is flare-game which is an actual game so had to
clone it under the games directory.
I did get the following as a suggestion but could not make a head or
tail of it :-
git clone -b master <file> <destination>
so should it have been :-
~/games$ git clone -b master flare-game.bundle ~/games/flare-game
Or something else ?
Looking forward to understand.
--
Regards,
Shirish Agarwal शिरीष अग्रवाल
My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17
--
You received this message because you are subscribed to the Google
Groups "Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Git for
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.