gitee-cli
0.4.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global gitee-cli --version 0.4.2
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local gitee-cli --version 0.4.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=gitee-cli&version=0.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package gitee-cli --version 0.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GiteeCli
Github
https://github.com/BlackBoxRecorder/GiteeCli
使用前准备
1.申请Gitee API Token
登录Gitee,在 设置--> 安全设置-->私人令牌 中生成新令牌
2.生成SSH Key
在电脑上生成SSH Key 并填入 设置-->安全设置-->公钥部分。参照:公钥设置
3.安装.NET 9 SDK
下载 SDK 并安装,下载地址
4.安装 GiteeCli 工具
打开终端,执行
dotnet tool install --global gitee-cli
查看使用帮助:
gitee-cli -h
查看子命令使用帮助:
gitee-cli remote -h
命令介绍
设置 Token
通过命令行设置(仅Windows)
设置第一步生成的私人令牌,在终端中执行:
gitee-cli token 0c47b5a4a6c43765bc33a14ec7169
通过环境变量设置
在系统上添加环境变量 GITEE_TOKEN = 0c47b51262c43765bc33a14ec7169
远程仓库
列出仓库
列出用户在 gitee.com 上的所有个人仓库:
gitee-cli remote list
创建仓库
在 gitee.com 上创建新仓库:
gitee-cli remote create --name <repo_name> --init
克隆仓库
在终端执行以下命令,其中 <repo_name> 是 gitee-cli list 命令输出的仓库名称
gitee-cli remote clone --name <repo_name>
克隆所有仓库,执行:
gitee-cli remote clone --all
选择要克隆的仓库:
gitee-cli remote clone --select
删除仓库
从 gitee.com 删除一个仓库,执行:
gitee-cli remote delete --name <repo_name>
清空仓库
清空一个远程仓库:
gitee-cli remote clear --name <repo_name>
本地仓库
添加
将一个git仓库添加到 gitee-cli 的配置中,gitee-cli 可以通过表格显示仓库的 git status 信息
//添加当前路径
gitee-cli local add .
//从当前目录的子目录中批量添加
gitee-cli local add . --sub
状态
查看本地仓库的提交状态
gitee-cli local status
推送
将本地仓库推送到远端,自动执行 git add、git commit、git pull、git push
gitee-cli local push --name <repo_name>
批量推送
gitee-cli local push --all
移除
如果仓库位置变动,需要移除并重新添加
gitee-cli local remove --name <repo_name>
移除所有
gitee-cli local remove --all
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.