* Push to remote.
(repositoryPath: string, params: GitPushParams = {})
| 301 | * Push to remote. |
| 302 | */ |
| 303 | async push(repositoryPath: string, params: GitPushParams = {}): Promise<GitOperationResult> { |
| 304 | try { |
| 305 | await this.ensureFreshOperationState(repositoryPath); |
| 306 | const result = await gitAPI.push(repositoryPath, params); |
| 307 | return result; |
| 308 | } catch (error) { |
| 309 | log.error('Failed to push', error); |
| 310 | return { |
| 311 | success: false, |
| 312 | error: error instanceof Error ? error.message : i18nService.t('panels/git:errors.pushFailed') |
| 313 | }; |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Pull from remote. |