From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: git pull a subtree, embedded trees
Date: Wed, 13 Sep 2006 16:21:56 +0200 [thread overview]
Message-ID: <ee945j$h3u$1@sea.gmane.org> (raw)
In-Reply-To: 4508020F.2050604@sgi.com
Tim Shimmin wrote:
> I'm new to git and have a couple of novice questions.
>
> * Is it possible to only pull in a subtree from
> a repository.
I assume that by pull you mean checkout...
I think it is possible (try git-read-tree with --prefix option,
and select subtree by giving either it's sha1, or e.g.
HEAD:<path> form), but not easy to do. Git revisions are
snapshots of the whole project (the revisions are states of
the whole project).
> Moreover, is it possible to have a subtree based on another
> repository.
It is possible. For example, make empty directory <subproject>
somewhere, add this directory, or just all the files in it
either to .gitignore or .git/info/excludes file, then clone
the other project (subproject) to this place. You would have
the following directory structure
/
dir1
dir2
dir2/subdir
subproject
subproject/.git
subproject/subprojectsubdir
...
> * Are there any tools for dumping out the contents of the
> git objects in the .git/objects directory.
> By dumping out, I mean an ascii representation of the data
> fields for the commit and tree objects in particular.
> I've written a simple small program to dump out the index
> entries (cache entries).
git-cat-file -p
> I just want to see what is exactly stored in the .git
> binary files and how they change when I do various git
> operations.
Loose object are stored type+compressed contents. But usually
everything except latest work is in packs.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-09-13 14:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 13:05 git pull a subtree, embedded trees Tim Shimmin
2006-09-13 14:21 ` Jakub Narebski [this message]
2006-09-18 5:50 ` Timothy Shimmin
2006-09-18 5:58 ` Jakub Narebski
2006-09-18 6:42 ` Shawn Pearce
2006-09-18 6:47 ` Shawn Pearce
2006-09-13 15:00 ` Shawn Pearce
2006-09-18 5:57 ` Timothy Shimmin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ee945j$h3u$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).