Files
Gittea-plugin/cmd/push.go
Spencer b7ea167786 Initial commit: gtea CLI tool
Go CLI that wraps the Gitea API and git to create repos, commit,
push, and pull without leaving the terminal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 14:11:34 -04:00

18 lines
325 B
Go

package cmd
import (
"github.com/spf13/cobra"
)
var pushCmd = &cobra.Command{
Use: "push",
Short: "Push current branch to Gitea",
RunE: func(cmd *cobra.Command, args []string) error {
branch, err := currentBranch()
if err != nil {
branch = "main"
}
return runGit(".", "push", "-u", "origin", branch)
},
}