NAME

bif-init - initialize a new bif repository

VERSION

0.1.5_2 (2015-06-26)

SYNOPSIS

bif init [NAME] [LOCATION] [OPTIONS...]

DESCRIPTION

The bif-init command initializes a repository ready for use by other bif commands. The repository type - Working, Local Hub, or Remote Hub - depends on the arguments given. In addition, a special User repository will always be created if it doesn't exist.

All of the work is actually performed by other commands. They are wrapped by bif-init in order to simplify common initialization scenarios, each of which is described in more detail below.

User Repository

If the user repository ($HOME/.bifu) does not exist bif-init will initialize it with a "self" identity before doing anything else.

bif init
# Initialising repository: .bifu (v322)
# Creating "self" identity:
#   Name: [Your Name] 
#   Short Name: [YN] 
#   Contact Method: [email] 
#   Contact Email: [your@email.adddr] 
# Identity created: 1

After the user repository check bif-init continues with the intended action.

Working (Normal) Repository

When called with no arguments a working repository is created in $PWD/.bif and the "self" identity is imported from the User repository.

bif init
# Creating repository: $PWD/.bif (v323)
# Importing identity ($HOME/.bifu): received: 1/1

The current working repository is where most project management actions take place.

Local Hub Repository

When the NAME argument is given on its own a local hub repository is initialized in NAME.bif.

bif init myhub
# Creating repository: myhub.bif (v323)
# Importing identity ($HOME/.bifu): received: 1/1
# Hub created: myhub

A purely local hub repository is really only useful for debugging synchonization operations, or if several people are working on a project together inside a single machine. The bif-pull-hub command is used to "register" a local hub with the current working repository:

bif pull hub myhub.bif
# myhub.bif: received: 2/2
# Hub pulled: myhub

Remote Hub Repository

Initializing a remote hub repository can only be performed from a previously initialized working repository. It also requires that you have registered with a hub provider and have signed up for a hosting plan.

bif init
bif pull provider PROVIDER
bif list plans
bif signup PLAN

You can initialize a remote hub by specifying the provider's host as the LOCATION.

bif list hosts
bif init myhub host.provider

ARGUMENTS & OPTIONS

NAME

The name of a new hub repository

LOCATION

The location of a new remote hub repository.

--keep-invalid

This sets the keep_invalid option in the bifkv table to true. This prevents invalid changes from being rolled back out of the database so they can be inspected. As this option is aimed at developers it is hidden from normal usage messages.

Note that the global --user-repo option does not apply in the context of bif-init and is ignored.

ERRORS

DirExists

Attempting to initialise an existing repository is considered an error.

FILES

$HOME/.bifu/

Default user repository location.

SEE ALSO

bif(1)

AUTHOR

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Copyright 2013-2015 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.