2021-01-29 06:27:58 +05:30
|
|
|
---
|
|
|
|
date: "2020-07-06T16:00:00+02:00"
|
|
|
|
title: "使用: Push Options"
|
|
|
|
slug: "push-options"
|
|
|
|
weight: 15
|
|
|
|
toc: false
|
|
|
|
draft: false
|
|
|
|
menu:
|
|
|
|
sidebar:
|
|
|
|
parent: "usage"
|
|
|
|
name: "Push Options"
|
|
|
|
weight: 15
|
|
|
|
identifier: "push-options"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Push Options
|
|
|
|
|
|
|
|
Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt)
|
|
|
|
。
|
|
|
|
|
|
|
|
## 支援的 Options
|
|
|
|
|
2022-07-28 06:52:47 +05:30
|
|
|
- `repo.private` (true|false) - 修改儲存庫的可見性。
|
|
|
|
|
2021-01-29 06:27:58 +05:30
|
|
|
與 push-to-create 一起使用時特別有用。
|
2022-07-28 06:52:47 +05:30
|
|
|
|
2021-01-29 06:27:58 +05:30
|
|
|
- `repo.template` (true|false) - 修改儲存庫是否為範本儲存庫。
|
|
|
|
|
|
|
|
以下範例修改儲存庫的可見性為公開:
|
|
|
|
|
|
|
|
```shell
|
2023-03-14 22:42:27 +05:30
|
|
|
git push -o repo.private=false -u origin main
|
2021-01-29 06:27:58 +05:30
|
|
|
```
|