# git-remote **Repository Path**: kumare/git-remote ## Basic Information - **Project Name**: git-remote - **Description**: 本程序实现了从git中拉取仓库部署(为测试部署及开发环境部署)到远程的服务器上的功能。方便后期前后端的联调。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-27 - **Last Updated**: 2025-06-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitremote 本程序实现了从 Git 中拉取仓库部署(为测试部署及开发环境部署)到远程服务器上的功能,方便后期前后端的联调。 > 远程服务器需要 Git 仓库的访问权限 ## 命令 ### 通用 - `gitremote gitignore` 将 gitremote 的配置文件放在 `.gitignore` 文件中,避免同步。 - `gitremote dev [name]` 将会打开一个文本文件,配置里面的远程部署命令,可以指定执行命令的文件名称。 - `gitremote dev vite` 快速指定部署。 ### 本地端 - `gitremote sync` 开始同步仓库的数据到服务器。 - `gitremote push-sync "xxxx"` Git push 远程仓库后通知同步,xxx 是 commit 的 -m 参数,需要目录存在 Git。 - `gitremote init` 初始化本地库。 - `gitremote remote 192.174.22.14:2233` 设置远程服务器地址。 - `gitremote sendfile` 直接发送文件到服务器。 ### 远程端 - `gitremote bind -git xxx.git` 绑定远程仓库。 - `gitremote runserver` 在当前目录监听本地端的同步命令,并实时同步部署。 - `gitremote dev` 将会打开一个文本文件,里面需要编写一些执行的命令。 - `gitremote dev-fast vite` 快速指定部署。 - `gitremote pwd-set 221221` 设置服务器密码。 ## 配置文件 Gitremote 的配置文件主要有: ### 本地端 - `remote-server.json` 远程服务器的信息,如 IP 和密码等。 - `cache/` 一些缓存的数据。 - `recv-file/` 从客户端接收的文件。 - `devs/` 所有的运维部署命令文件。