feat: workspace-bootstrap — init SSH/git/Cursor для Mac и Windows
Единый workspace.local.env для адресов и паролей, init-machine, Set-GitRemotes, push-safe и check-no-secrets для политики kalinamall/github.
This commit is contained in:
+7
-3
@@ -1,4 +1,4 @@
|
||||
# Работа с Git
|
||||
# Работа с Git
|
||||
|
||||
Три **SSH**-remote (без HTTPS и без `origin`):
|
||||
|
||||
@@ -25,12 +25,16 @@ git clone ssh://git@git.kalinamall.lan:2222/PapaTramp/reverse-proxy.git
|
||||
cd reverse-proxy
|
||||
```
|
||||
|
||||
На Windows после [Setup-SshAccess](https://git.kalinamall.ru/PapaTramp/Answer.and.other.shit) (или локально):
|
||||
На Windows:
|
||||
|
||||
```powershell
|
||||
Set-GitRemotes.ps1 -Repo reverse-proxy
|
||||
cd scripts\workspace-bootstrap
|
||||
.\init-machine.ps1
|
||||
.\scripts\Set-GitRemotes.ps1 -Repo reverse-proxy
|
||||
```
|
||||
|
||||
Полная настройка новой машины: [scripts/workspace-bootstrap/README.md](../scripts/workspace-bootstrap/README.md).
|
||||
|
||||
## Обновление локальной копии
|
||||
|
||||
```bash
|
||||
|
||||
+22
-4
@@ -1,4 +1,4 @@
|
||||
# Политика репозиториев: git.kalinamall.ru и GitHub
|
||||
# Политика репозиториев: git.kalinamall.ru и GitHub
|
||||
|
||||
Для перечисленных проектов действует единая схема: **основное хранилище — корпоративный Gitea**, **GitHub — резервная копия без секретов**.
|
||||
|
||||
@@ -37,13 +37,31 @@
|
||||
|
||||
## Настройка remotes (один раз на машине)
|
||||
|
||||
Только **SSH**, три имени (скрипт `Set-GitRemotes.ps1` из Answer.and.other.shit):
|
||||
Только **SSH**, три имени — скрипт **`scripts/workspace-bootstrap`** (Mac/Linux: `Set-GitRemotes.sh`, Windows: `Set-GitRemotes.ps1`):
|
||||
|
||||
```bash
|
||||
cd ~/Documents/Cursor/Projects/reverse-proxy/scripts/workspace-bootstrap
|
||||
cp config/workspace.local.env.example config/workspace.local.env
|
||||
# заполнить workspace.local.env
|
||||
./init-machine.sh
|
||||
```
|
||||
|
||||
Или для одного репо:
|
||||
|
||||
```bash
|
||||
./scripts/Set-GitRemotes.sh reverse-proxy
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```powershell
|
||||
cd C:\Users\papat\Projects\reverse-proxy
|
||||
..\Answer.and.other.shit\scripts\ssh-setup\Set-GitRemotes.ps1 -Repo reverse-proxy
|
||||
cd C:\Users\papat\Projects\reverse-proxy\scripts\workspace-bootstrap
|
||||
.\init-machine.ps1
|
||||
..\scripts\Set-GitRemotes.ps1 -Repo reverse-proxy
|
||||
```
|
||||
|
||||
Старый вариант (Answer.and.other.shit) — переносится в `scripts/workspace-bootstrap`.
|
||||
|
||||
Или вручную:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user