init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInitialize git-pkgs
初始化git-pkgs
Set up and maintain the git-pkgs dependency database for a repository.
为仓库设置并维护git-pkgs依赖数据库。
Commands
命令
First-time setup (walks git history, builds SQLite database in ):
.git/pkgs.sqlite3bash
git-pkgs initOptions:
- - analyze a specific branch
--branch=NAME - - start from a specific commit
--since=SHA - - rebuild from scratch
--force - - skip installing git hooks
--no-hooks
Update after pulling new commits:
bash
git-pkgs reindexCheck database status:
bash
git-pkgs infoUpgrade database schema (rebuilds if schema changed):
bash
git-pkgs upgradeManage git hooks for automatic reindexing:
bash
git-pkgs hooks install
git-pkgs hooks removeList supported ecosystems:
bash
git-pkgs ecosystems首次设置(遍历git历史记录,在中构建SQLite数据库):
.git/pkgs.sqlite3bash
git-pkgs init选项:
- - 分析特定分支
--branch=NAME - - 从特定提交开始
--since=SHA - - 从头重建
--force - - 跳过安装git钩子
--no-hooks
拉取新提交后更新:
bash
git-pkgs reindex检查数据库状态:
bash
git-pkgs info升级数据库架构(若架构变更则重建):
bash
git-pkgs upgrade管理git钩子以实现自动重新索引:
bash
git-pkgs hooks install
git-pkgs hooks remove列出支持的生态系统:
bash
git-pkgs ecosystemsWhen to use
使用场景
- When a user wants to start tracking dependencies in a repo
- When commands fail because no database exists
git-pkgs - After pulling or rebasing to update the index
- When the database needs upgrading after a git-pkgs version update
- 当用户想要开始跟踪仓库中的依赖项时
- 因不存在数据库导致命令执行失败时
git-pkgs - 拉取或变基后需要更新索引时
- git-pkgs版本更新后需要升级数据库时