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>
This commit is contained in:
17
cmd/push.go
Normal file
17
cmd/push.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user