Skip to contentSkip to conversation

Git within Git what a git

DISCUSSION elkten 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

elkten

author
#0 lore raw

Hi All,

Before I go hacking the git source code, I would like git to be able to manage git trees in git trees, however I would like to check it can't already be done, let me give an example...

Imagine a directory structure thus...

fedora12-rc3/

|-- .git
|-- init
|   `-- .git
|-- kernel
|   `-- .git
`-- libpng
    `-- .git

fedora12-rc3 is the attempt at a fedor12-rc3 build, inside are the packages for init, the kernel and libpng, each of these init, kernel and libpng have their own branches which correspond to their respective versions.

Inside the fedora12-rc3 directory is also many branches called fedora12-rc2, fedora12-rc1 etc...

I would like to be able to "git checkout fedora12-rc1", and it to automatically checkout the corresponding versions relating to fedora12-rc1, into init, kernel and libpng.

When I make a new branch in say "init" and check in the changes, when I go to the fedora12-rc1 branch I would like then to type git commit, and it record the version change within the init branch, thus when I go to check out the rc1 branch again I get all my changes.

If I switched branches and there were uncommitted changes in "kernel" it would warn me and ask me if I wanted to continue.

There are various different merge options that would be nice to, say fred was working on fedora12-rc2-fred and bob was working on fedroa12-rc2-bob, and I wanted to merge the two together (and we had made changes to the same packages) this would all be done for me.

I can understand this might be possible with some scripting, on git hooks, however this would seem a neat feature for git to support itself, does anybody have any scripts to do this?

Do other people think this would be a useful feature?

elk

Signature · 2 lines
View this message in context: http://www.nabble.com/Git-within-Git-what-a-git-tp23070273p23070273.html
Sent from the git mailing list archive at Nabble.com.
#1 lore raw
Quoted 3 lines · elkten

Before I go hacking the git source code, I would like git to be able to manage git trees in git trees, however I would like to check it can't already be done, let me give an example...

Go and read the docs, the feature exists already, it's called submodules.

Signature · 4 lines
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : [email protected]
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
#2 lore raw
In reply to elkten
Quoted 5 lines · elkten

Hi All,

Before I go hacking the git source code, I would like git to be able to manage git trees in git trees, however I would like to check it can't

git-submodule has a google summer of code entry that's sounds like it's right up your alley:

	http://git.or.cz/gitwiki/SoC2009Ideas

You help in making it happen would be awesome, especially when handling large collections of git projects.

I'm sure you've seen Shawn's repo project? (google android + repo) If your timeline is shorter then he already has lots of functionality in there.

http://source.android.com/download/using-repo

Longer term (and I think Shawn agrees with this) we want it all back in git, hence the gsoc project.

Are you looking at running some of fedora's infrastructure with this, or was that just an example? If so, that'd be really interesting since those are the same kinda problems any large organization runs into (lots of projects, lots of disconnect git repos), and something I would be interested in helping out with as well.

Quoted 55 lines

already be done, let me give an example...

Imagine a directory structure thus...

fedora12-rc3/

|-- .git
|-- init
|   `-- .git
|-- kernel
|   `-- .git
`-- libpng
    `-- .git

fedora12-rc3 is the attempt at a fedor12-rc3 build, inside are the packages for init, the kernel and libpng, each of these init, kernel and libpng have their own branches which correspond to their respective versions.

Inside the fedora12-rc3 directory is also many branches called fedora12-rc2, fedora12-rc1 etc...

I would like to be able to "git checkout fedora12-rc1", and it to automatically checkout the corresponding versions relating to fedora12-rc1, into init, kernel and libpng.

When I make a new branch in say "init" and check in the changes, when I go to the fedora12-rc1 branch I would like then to type git commit, and it record the version change within the init branch, thus when I go to check out the rc1 branch again I get all my changes.

If I switched branches and there were uncommitted changes in "kernel" it would warn me and ask me if I wanted to continue.

There are various different merge options that would be nice to, say fred was working on fedora12-rc2-fred and bob was working on fedroa12-rc2-bob, and I wanted to merge the two together (and we had made changes to the same packages) this would all be done for me.

I can understand this might be possible with some scripting, on git hooks, however this would seem a neat feature for git to support itself, does anybody have any scripts to do this?

Do other people think this would be a useful feature?

elk

Signature · 7 lines
View this message in context: http://www.nabble.com/Git-within-Git-what-a-git-tp23070273p23070273.html
Sent from the git mailing list archive at Nabble.com.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
		David