Remote Operations¶
CommitDB can sync with remote Git repositories (GitHub, GitLab, etc.).
Configuring Remotes¶
-- Add a remote
REMOTE ADD origin https://github.com/user/repo.git
-- Add with authentication
REMOTE ADD origin https://github.com/user/repo.git WITH TOKEN 'ghp_xxx'
REMOTE ADD origin git@github.com:user/repo.git WITH SSH '/path/to/key'
-- Remove a remote
REMOTE REMOVE origin
-- View remotes
SHOW REMOTES
Authentication Methods¶
Push & Pull¶
-- Push current branch to remote
PUSH origin master
-- Pull updates from remote
PULL origin master
-- Fetch without merging
FETCH origin
Sync Workflow Example¶
-- Initial setup
REMOTE ADD origin https://github.com/user/mydb.git WITH TOKEN 'ghp_xxx'
-- Push local changes
PUSH origin master
-- Later, pull updates
PULL origin master
-- Work on a feature
CREATE BRANCH feature
CHECKOUT feature
-- ... make changes ...
CHECKOUT master
MERGE feature
-- Push the merged changes
PUSH origin master