| Command | Description | Example |
|---|---|---|
bvc init |
Initialize new repository | bvc init my-project |
bvc clone |
Clone existing repository | bvc clone 0x123abc... |
bvc config |
Configure user settings | bvc config --wallet 0x456def... |
bvc add |
Stage files for commit | bvc add index.js |
bvc commit |
Create new commit | bvc commit -m "Fix bug" |
bvc status |
Show working tree status | bvc status |
bvc log |
View commit history | bvc log --limit 10 |
bvc push |
Upload commits to blockchain | bvc push |
bvc pull |
Fetch latest changes | bvc pull |
bvc checkpoint |
Batch commit to blockchain | bvc checkpoint main |
Initialize a new BVC repository
- Creates local
.bvc/folder - Generates repository ID
- Records initial state on blockchain
# Initialize with name
bvc init my-awesome-project
# Initialize in current directory
bvc init .
# Initialize with specific blockchain network
bvc init my-project --network sepoliaOptions:
--network <network>- Specify blockchain network (mainnet, sepolia, polygon)--private- Create private repository--description <desc>- Add repository description
Clone an existing repository from blockchain/IPFS
# Clone to current directory
bvc clone 0x123abc456def789...
# Clone to specific directory
bvc clone 0x123abc456def789... ./my-project
# Clone specific branch/commit
bvc clone 0x123abc456def789... --commit abc123def456Options:
--commit <hash>- Clone specific commit--depth <number>- Shallow clone with limited history--branch <name>- Clone specific branch (if supported)
Configure BVC settings
# Set wallet address
bvc config wallet 0x123abc456def...
# Set private key (for signing)
bvc config private-key 0x789def123abc...
# Set IPFS node URL
bvc config ipfs-url https://ipfs.infura.io:5001
# Set default network
bvc config network polygon
# View all config
bvc config --list
# View specific config
bvc config walletCommon Config Keys:
wallet- Wallet address for commitsprivate-key- Private key for signing transactionsipfs-url- IPFS node endpointnetwork- Default blockchain networkgas-price- Default gas price for transactions
Stage files for the next commit
# Add single file
bvc add index.js
# Add multiple files
bvc add index.js package.json
# Add directory
bvc add src/
# Add all files
bvc add .
# Add with pattern
bvc add *.jsOptions:
--allor-A- Add all modified files--force- Force add ignored files--update- Only add already tracked files
Create a new commit with staged files
# Basic commit
bvc commit -m "Add new feature"
# Multi-line commit message
bvc commit -m "Fix critical bug
This resolves the issue where users couldn't login
after the recent update."
# Commit all modified files
bvc commit -am "Quick fix"
# Commit without uploading to blockchain (local only)
bvc commit -m "Work in progress" --localOptions:
-m <message>- Commit message-a- Automatically stage modified files--local- Create local commit only (don't push to blockchain)--author <address>- Override commit author--sign- Sign commit with private key
Show the working tree status
# Basic status
bvc status
# Short format
bvc status --short
# Include ignored files
bvc status --ignoredOutput shows:
- Staged files (green)
- Modified files (red)
- Untracked files (white)
- Ignored files (gray, with --ignored)
Push local commits to blockchain
# Push all pending commits
bvc push
# Push specific commit
bvc push abc123def456
# Push with custom gas price
bvc push --gas-price 20
# Push and wait for confirmation
bvc push --wait
# Dry run (simulate without executing)
bvc push --dry-runOptions:
--gas-price <price>- Set gas price in gwei--wait- Wait for transaction confirmation--dry-run- Simulate push without executing--force- Force push (overwrite remote history)
Fetch and integrate changes from blockchain/IPFS
# Pull latest changes
bvc pull
# Pull specific commit
bvc pull abc123def456
# Pull without auto-merge
bvc pull --no-merge
# Pull from specific repository
bvc pull 0x123abc456def789...Options:
--no-merge- Fetch without merging--force- Force pull (overwrite local changes)--verify- Verify IPFS content integrity
Display commit history
# Show recent commits
bvc log
# Limit number of commits
bvc log --limit 5
# Show commits by specific author
bvc log --author 0x123abc...
# Show commits since date
bvc log --since "2024-01-01"
# One line per commit
bvc log --oneline
# Show graph
bvc log --graphOptions:
--limit <number>- Limit number of commits shown--author <address>- Filter by author address--since <date>- Show commits since date--until <date>- Show commits until date--oneline- Condensed output format--graph- Show branch/merge graph
Create a checkpoint by bundling multiple commits
# Checkpoint current branch
bvc checkpoint
# Checkpoint specific branch
bvc checkpoint main
# Checkpoint with custom message
bvc checkpoint --message "Weekly checkpoint"
# Checkpoint last N commits
bvc checkpoint --commits 5Options:
--message <msg>- Checkpoint description--commits <number>- Number of commits to include--from <hash>- Starting commit hash--to <hash>- Ending commit hash
Fork an existing repository
# Fork repository
bvc fork 0x123abc456def789...
# Fork with custom name
bvc fork 0x123abc456def789... --name my-fork
# Fork specific commit
bvc fork 0x123abc456def789... --commit abc123defMerge commits (repository owner only)
# Merge specific commit
bvc merge abc123def456
# Merge with message
bvc merge abc123def456 -m "Merge feature branch"Show differences between commits
# Show working tree changes
bvc diff
# Compare staged changes
bvc diff --staged
# Compare two commits
bvc diff abc123 def456
# Show stats only
bvc diff --statShow detailed commit information
# Show latest commit
bvc show
# Show specific commit
bvc show abc123def456
# Show commit without diff
bvc show abc123def456 --no-diffVerify commit integrity and blockchain state
# Verify all commits
bvc verify
# Verify specific commit
bvc verify abc123def456
# Verify IPFS content
bvc verify --ipfsManage remote repositories
# List remotes
bvc remote
# Add remote
bvc remote add origin 0x123abc456def789...
# Remove remote
bvc remote remove origin
# Show remote info
bvc remote show originThese options work with most commands:
--help- Show command help--version- Show BVC version--verbose- Verbose output--quiet- Suppress output--network <name>- Override default network--config <file>- Use custom config file
# 1. Setup
bvc config wallet 0x123abc456def789...
bvc config network sepolia
# 2. Create new project
bvc init my-dapp
cd my-dapp
# 3. Add files and commit
echo "# My DApp" > README.md
bvc add README.md
bvc commit -m "Initial commit"
# 4. Push to blockchain
bvc push
# 5. Continue development
echo "console.log('Hello Web3!');" > index.js
bvc add index.js
bvc commit -m "Add main script"
# 6. Create checkpoint (batch multiple commits)
bvc checkpoint main
# 7. Clone existing project
bvc clone 0x987fed321cba... my-other-project