|
| | __init__ (self, repo_path=None) |
| | 初始化Git操作对象
|
| | reset_repos_path (self, repo_path) |
| | 重置仓库目录
|
| | run_other_cmd (self, command) |
| | 提供一个其他未进一步封装执行Git命令的方法
|
| | clone (self, repo_url, target_dir=None, recursive=False) |
| | 从指定仓库地址进行克隆到指定本地目录
|
| | clone_bare (self, repo_url, target_dir=None) |
| | 从指定仓库地址进行克隆到指定本地目录,并发布为bare服务
|
| | init (self) |
| | 初始化本地仓库
|
| | get_remote_origin_url (self) |
| | 获取当前仓库的远程地址
|
| | pull (self) |
| | 拉取远程仓库最新代码
|
| | checkout (self, branch_name) |
| | 切换分支
|
| | checkout_submodules_branch (self, branch_name) |
| | 切换所有子库到指定分支
|
| | create_branch (self, branch_name) |
| | 创建新分支
|
| | add (self, files=".") |
| | 添加文件到暂存区
|
| | commit (self, message) |
| | 提交更改
|
| | push (self, remote="origin", branch_name=None) |
| | 推送更改到远程仓库
|
| | update_to_last_commit (self, branch_name) |
| | 同步到远程仓最新的提交
|
| | status (self, extParam=None) |
| | 查看工作区状态
|
| | log (self, num_commits=10) |
| | 查看提交日志
|
| | branches (self, remote=False) |
| | 查看分支列表
|
| | current_branchName (self) |
| | 当前分支名称
|
| | exists_submodules (self) |
| | 检查是否存在子模块
|
| | update_submodules_to_last_commit (self, branch_name) |
| | 同步所有子库到远程仓最新的提交
|
| | git_daemon_repos (self, basepath, port=None) |
| | 发布git守护进程服务
|