Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (32 sloc) 1.7 KB
id title permalink layout category prev next
initializing-bit
Initializing Bit
docs/initializing-bit.html
docs
Setup and Configuration
setup-authentication.html
remote-collection.html

Initializing Bit on a repository allows you to track and share components.

Initialize a Bit workspace on a project by running the bit init command a project’s root directory.

cd project-root
bit init

Initializing Bit adds resources to a project: bit config, .bitmap file, and a local storage directory.

Recreate Bit resources in case of corrupted data

If an error caused data corruption, add the --reset flag to bit init.

bit init --reset

The contents of a workspace with Bit

Bit local storage

The local storage stores Bit objects (components, versions, etc.). Bit manages it in a directory called .bit. If you use Git, Bit creates a local storage directory in the .git directory. Do not track changes in the .bit directory using SCM. Make sure to add it to the .gitignore file.

To force Bit not to nest the local storage in .git, use the --standalone flag:

bit init --standalone

bit config

bit config is Bit's main configuration section. By default it is managed in the project's package.json file. If you choose to set up bit in standalone mode, Bit generate a bit.json file to hold the configuration.

.bitmap

.bitmap maps components with local files in the workspace. Bit uses this file to import and update sourced components in the correct paths in a workspace. You should track this file by an SCM tool, alongside the project.

You can’t perform that action at this time.