Quick Start Guide¶
Get up and running with GitBridge in under 5 minutes! This guide will walk you through syncing your first repository.
Prerequisites¶
Before starting, ensure you have:
- GitBridge installed (Installation Guide)
- Network access to GitHub.com
- A target directory for the synced repository
Step 1: Basic Repository Sync¶
Let's start by syncing a public repository:
Bash | |
---|---|
What happens:
- GitBridge connects to the GitHub repository
- Downloads the entire repository structure
- Saves files to
~/projects/cpython
- Creates
.gitbridge/metadata.json
for tracking
Success!
You've synced your first repository! The output will show:
Step 2: Incremental Updates¶
Run the same command again:
Bash | |
---|---|
Notice how it's much faster! GitBridge only downloads changed files:
Step 3: Using Configuration Files¶
Instead of typing long commands, create a configuration file:
Step 4: Syncing Private Repositories¶
For private repositories, you need authentication:
Generate a GitHub Token¶
- Go to GitHub → Settings → Developer settings → Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo
(full control of private repositories) - Copy the generated token
Use the Token¶
Step 5: Specific Branch or Tag¶
Sync a specific branch, tag, or commit:
Bash | |
---|---|
Common Use Cases¶
Corporate Environment with Proxy¶
If you're behind a corporate proxy:
Bash | |
---|---|
When API Access is Blocked¶
Use browser automation as fallback:
Bash | |
---|---|
Browser Mode
Browser mode is slower but works when API access is blocked. It requires Chrome/Chromium installed.
Check Repository Status¶
Before syncing, check the repository status:
Bash | |
---|---|
Output:
Text Only | |
---|---|
Quick Reference¶
Essential Commands¶
Command | Description |
---|---|
gitbridge sync | Synchronize repository |
gitbridge status | Check repository status |
gitbridge --help | Show help message |
gitbridge --version | Show version |
Key Options¶
Option | Description | Example |
---|---|---|
--repo | Repository URL | --repo https://github.com/user/repo |
--local | Local directory | --local ~/projects/repo |
--token | GitHub token | --token ghp_abc123 |
--ref | Branch/tag/commit | --ref develop |
--method | Sync method | --method browser |
--config | Config file | --config config.yaml |
--verbose | Detailed output | --verbose |
Tips and Tricks¶
Speed Up Syncs
Use incremental mode (default) to only download changed files:
Multiple Repositories
Create multiple config files:
Automation
Add to cron for automatic syncing:
What's Next?¶
Now that you've mastered the basics:
- 📖 Read the User Guide for advanced features
- 🔧 Learn about Configuration options
- 🔐 Set up Authentication properly
- 🏢 Configure for Corporate Environments
- 🤖 Explore CLI Commands in detail
Need Help?¶
If something doesn't work:
- Check the Troubleshooting Guide
- Run with
--verbose
for detailed error messages - Check your network access to GitHub
- Create an issue for support