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>
18 lines
321 B
Go
18 lines
321 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var pullCmd = &cobra.Command{
|
|
Use: "pull",
|
|
Short: "Pull latest changes from Gitea",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
branch, err := currentBranch()
|
|
if err != nil {
|
|
branch = "main"
|
|
}
|
|
return runGit(".", "pull", "origin", branch)
|
|
},
|
|
}
|