4 "github.com/spf13/cobra"
7 // uninstallCmd removes any configuration and hooks set by Git LFS.
8 func uninstallCommand(cmd *cobra.Command, args []string) {
9 if err := cmdInstallOptions().Uninstall(); err != nil {
13 if localInstall || cfg.InRepo() {
14 uninstallHooksCommand(cmd, args)
18 Print("Global Git LFS configuration has been removed.")
22 // uninstallHooksCmd removes any hooks created by Git LFS.
23 func uninstallHooksCommand(cmd *cobra.Command, args []string) {
24 if err := uninstallHooks(); err != nil {
28 Print("Hooks for this repository have been removed.")
32 RegisterCommand("uninstall", uninstallCommand, func(cmd *cobra.Command) {
33 cmd.Flags().BoolVarP(&localInstall, "local", "l", false, "Set the Git LFS config for the local Git repository only.")
34 cmd.Flags().BoolVarP(&systemInstall, "system", "", false, "Set the Git LFS config in system-wide scope.")
35 cmd.AddCommand(NewCommand("hooks", uninstallHooksCommand))