create pre-commit file to skip big files

master
Bel LaPointe 2021-02-25 22:09:50 -06:00
parent 0c6d3a6c6a
commit baf739658e
1 changed files with 5 additions and 2 deletions

View File

@ -2,8 +2,11 @@ package versions
import (
"fmt"
"io/ioutil"
"local/notes-server/config"
"os"
"os/exec"
"path"
"time"
)
@ -16,8 +19,8 @@ func New() (*Versions, error) {
v.cmd("git", "config", "user.email", "user@user.user")
v.cmd("git", "config", "user.name", "user")
s := getScript()
panic(s)
return v, nil
err := ioutil.WriteFile(path.Join(config.Root, "./.git/hooks/pre-commit"), []byte(s), os.ModePerm)
return v, err
}
func (v *Versions) Gitmmit() error {