Workspace component - avoid syncing .bitmap file by Git #5030
Replies: 2 comments
-
Few more notes: We will have new commands (names tbd) Bit pull will fetch and checkout the ws component then will checkout all the other components. We will add a prop in the ws.jsonc to set the ws component id (to support fresh git clone followed by bit pull. In that case you don't the bitmap yet so you need the id) |
Beta Was this translation helpful? Give feedback.
-
Another thought we were having is move the |
Beta Was this translation helpful? Give feedback.
-
Summary of a discussion between @ranm8 , @GiladShoham and I.
The goal is to be able to collaborate and share workspace using a new type of Bit component, which we'll call it a "workspace component". This component will contain the
.bitmap
,workspace.jsonc
and other files that normally reside in the root repo.One of the motivation for this feature is the difficulties we foreseen of using Git branches with Bit lanes. If .bitmap and other files don't need to be sync using Git, it'll be much easier to collaborate using Lanes.
As far as the implementation goes, this component will be pretty much like any other component, except its env will be a new core workspace-env. This way, it'll be easy to configure and distinguish this component from others. Other than that, it'll behave similar to other components, it can be tagged, exported, built and so on.
Normally, all files in the root-dir of a component are tracked by Bit. This component has the root dir of the workspace itself, so in order to not track all the components files to this component, we'll implement a new feature that exclude all root-dirs of other components when tracking a component.
To exclude other files that are not components, we'll need to implement another feature, which let users configure in the variants, file exclusion rules. To refer to this workspace-component in the
variants
section, we'll use.
notation, to indicate the root-dir.To improve it even more, we'll let users create
.bitignore
file. In the root level for the workspace component and in the component's directories.When tagging components, this workspace-component needs to be tagged as well because the .bitmap file had changed. However, normally, the .bitmap file gets changed by the end of the process, so if we tag it as other component, the .bitmap won't be up to date. To mitigate this, we'll tag this specific component after other components were successfully tagged.
Beta Was this translation helpful? Give feedback.
All reactions