-
Couldn't load subscription status.
- Fork 1
Create a new command store
You create a new command store using the AltCmd console application:
C:\> mkdir Alt
C:\> cd Alt
C:\Alt> altcmd init hello
By default, the init command will create a FileStore, which is just a folder on your local filesystem. The name you provide to init is the name of the folder, so the above creates C:\Alt\hello. Inside that folder you will find 3 files:
0.json holds a description of the init command that you just ran.
{
"CmdName": "ICreateStore",
"Sequence": 0,
"CreatedAt": "2019-09-10T19:22:54.207612Z",
"StoreId": "3ed0cad0-dbb8-42ea-8ed1-f42f91877d5e",
"Name": "C:\\Alt\\hello",
"Type": "File"
}
Each command that you append to a branch will create a new #.json file with the next command sequence number.
Command data is immutable. The content of all #.json files will never change.
.root holds metadata relating to the overall store, including a unique ID for the store.
{
"StoreId": "3ed0cad0-dbb8-42ea-8ed1-f42f91877d5e",
"UpstreamId": "00000000-0000-0000-0000-000000000000",
"UpstreamLocation": null,
"PushTimes": null
}
A file with the ".ac" file type holds metadata relating to the master branch for the new store. The file name is a GUID that was generated to uniquely identify the branch.
The user-perceived name for this branch is 'hello', matching the name of the folder that contains the AC file.
Unlike command data files, the content of an AC file will be updated each time a command is appended to the branch (at the very least, the value for the CommandCount property will be incremented).
{
"StoreId": "3ed0cad0-dbb8-42ea-8ed1-f42f91877d5e",
"ParentId": "00000000-0000-0000-0000-000000000000",
"BranchId": "3ed0cad0-dbb8-42ea-8ed1-f42f91877d5e",
"CreatedAt": "2019-09-10T19:22:54",
"CommandCount": 1,
"CommandDiscount": 0,
"RefreshCount": 0,
"RefreshDiscount": 0,
"LastMerge": {},
"LastPush": 0,
"IsCompleted": false
}
