Skip to content

Instantly share code, notes, and snippets.

@jmwright
Last active November 22, 2018 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmwright/9f91bcfcbdbb1f4bb0f9f26cc275ef38 to your computer and use it in GitHub Desktop.
Save jmwright/9f91bcfcbdbb1f4bb0f9f26cc275ef38 to your computer and use it in GitHub Desktop.
Using the git daemon to set up a demo on a local system

Intro

This assumes a Linux system. Adapt as needed for Windows.

Prerequisites

Note that most of this may be superceeded if a repo is created holding all the proper demo directory structure.

  1. Create a blank demo directory to be the root directory and cd into it: mkdir demo && cd demo
  2. Initialize the directory as a blank git repository: git init
  3. Follow steps 1 and 2 for the component you want to create.
  4. Make sure to cd back into the root demo directory before executing the next step.
  5. Make sure to have git installed. Then run the following command.
git daemon --reuseaddr --export-all --base-path=. --verbose --enable=receive-pack .

New Top Level Component

  1. Create a blank directory and cd into it: mkdir topcomp && cd topcomp
  2. Initialize the directory as a blank git repository: git init --bare .git
  3. In another terminal window (and in another directory) create a component: sr create topcomp
  4. cd into the new directory: cd topcomp
  5. Upload the project: sr upload -m "Initial commit" -u git://127.0.0.1/topcomp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment