func AddAndCommitData(path, msg string) (string, error) {
	changes, repositoryLocation, err := AddData(path)
	if err != nil {
		return "", err
	}
	var commitId string
	if changes {
		commitId, err = commit(repositoryLocation, msg)
		if err != nil {
			return "", err
		}
	}
	return commitId, nil
}
Adds and commits data found in path
package lfs
import (
	"context"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"
	"github.com/docker/docker/api/types"
	"github.com/docker/docker/api/types/container"
	"github.com/docker/docker/api/types/network"
	"github.com/docker/docker/client"
	"github.com/docker/go-connections/nat"
	git "gopkg.in/libgit2/git2go.v26"
	"github.com/pkg/errors"
)
func Track(filename, repositoryLocation string) (string, error) {
	cmd := exec.Command("git-lfs", "track", filename)
	cmd.Dir = repositoryLocation
	out, err := cmd.Output()
	time.Sleep(2 * time.Second)
	output := string(out)
	output = strings.TrimRight(output, "\n")
	return output, err
}