summaryrefslogtreecommitdiff
path: root/source_repositories
diff options
context:
space:
mode:
Diffstat (limited to 'source_repositories')
-rw-r--r--source_repositories/incubator.mdwn44
1 files changed, 44 insertions, 0 deletions
diff --git a/source_repositories/incubator.mdwn b/source_repositories/incubator.mdwn
index 51f64c17..0243b597 100644
--- a/source_repositories/incubator.mdwn
+++ b/source_repositories/incubator.mdwn
@@ -10,3 +10,47 @@ License|/fdl]]."]]"""]]
There is a repository for *this*, and *that*, and *everything* -- the
*incubator*: <http://git.savannah.gnu.org/cgit/hurd/incubator.git/>.
+
+As the `README` file in the `master` branch says, the development of the
+various software happens in separate branches.
+
+## Handling branches with `git-new-workdir`
+
+`git-new-workdir` is a contrib script provided with the git distribution
+(on Debian systems, in `/usr/share/doc/git/contrib/workdir/git-new-workdir`);
+it allows to create a new subrepository of a git repository, tracking one of
+its branches, usually as a subdirectory of the current repository.
+
+The advantage of using it for `incubator` is that only one clone is needed,
+and it can be possible to work simultaneously on many branches (instead of
+only on the current branch of that clone).
+The drawback is that updating a subrepository requires updating its branch
+on the main clone first.
+
+Let's start checking out the `incubator` repository:
+
+ $ git clone git://git.savannah.gnu.org/hurd/incubator.git
+ $ cd incubator/
+
+Assuming we now want to follow the development of the `tarfs/master` branch:
+we follow this branch:
+
+ $ git branch -t tarfs/master origin/tarfs/master
+
+Then now setup a local subrepository `tarfs` following it; we will create it
+as subdirectory of `incubator` (first parameter for `git-new-workdir`) for
+simplicity, but can be created anywhere else:
+
+ $ git-new-workdir . tarfs tarfs/master
+
+After this, a new `tarfs` subdirectory appears, which represents the
+`tarfs/master` branch. You can normally work on this new repository as usual.
+
+As said earlier, updating `tarfs` requires fetching/pulling in `incubator`
+first:
+
+ $ cd incubator/
+ incubator$ git pull/fetch
+ incubator$ cd tarfs/
+ tarfs$ git pull/fetch
+