From 7674ea1101a508e65b59b717d549c30b81c8a18e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 15 Mar 2013 23:38:52 +0100 Subject: more changes --- source_repositories/incubator.mdwn | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'source_repositories/incubator.mdwn') 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*: . + +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 + -- cgit v1.2.3