fix: git-sync для detached HEAD, shop-root требует .git
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,6 +30,28 @@ sudo bash scripts/quick-deploy-ubuntu.sh
|
||||
bash /opt/shop/shop10/scripts/server-update.sh
|
||||
```
|
||||
|
||||
## git: You are not currently on a branch / not a git repository
|
||||
|
||||
Клон на теге (detached HEAD) или обновление из `/opt/shop` вместо `/opt/shop/shop10`:
|
||||
|
||||
```bash
|
||||
cd /opt/shop/shop10
|
||||
git status
|
||||
bash scripts/git-sync.sh
|
||||
bash scripts/server-update.sh
|
||||
```
|
||||
|
||||
Если `fatal: not a git repository` в `/opt/shop/shop10`:
|
||||
|
||||
```bash
|
||||
ls -la /opt/shop/shop10/.git
|
||||
# нет .git — заново:
|
||||
mv /opt/shop/shop10 /opt/shop/shop10.bak.$(date +%s)
|
||||
git clone https://git.evilfox.cc/test/shop10.git /opt/shop/shop10
|
||||
cp /opt/shop/shop10.bak.*/.env /opt/shop/shop10/.env 2>/dev/null || cp /opt/shop/shop10/.env.example /opt/shop/shop10/.env
|
||||
bash /opt/shop/shop10/scripts/server-update.sh
|
||||
```
|
||||
|
||||
## scripts/server-update.sh: No such file or directory
|
||||
|
||||
Вы не в каталоге репозитория или клон в подпапке (например `/opt/shop/shop10`):
|
||||
|
||||
Reference in New Issue
Block a user