Matt Jesuele bd212a8260 dolt/go/cmd/git-dolt{,-smudge}: Add git smudge filter for git-dolt (#1651)
* dolt/go/cmd/git-dolt/config/config.go: Add package comment

* dolt/go/cmd/git-dolt: Factor CloneToRevision function out of Fetch command

* dolt/go/cmd/git-dolt: Factor AppendToFile out of Link command

* dolt/go/cmd/git-dolt: Add install command

* dolt/go/cmd/git-dolt-smudge: Create git-dolt-smudge command to use as a git smudge filter

* dolt/go/cmd/git-dolt/git-dolt.go: Cleanup

* dolt/bats/git-dolt.bats: Add bats test for git dolt install

* Jenkinsfile: Add git-dolt-smudge to dolt/bats stage

* dolt/bats/git-dolt.bats: Add test for git-dolt smudge filter

* dolt/bats/git-dolt.bats: Configure fake name and email in test git repos so that committing works on Jenkins

* dolt/{bats,go}: Improve git-dolt cloning behavior (especially streaming output from dolt clone); refactor

* dolt/{bats,go}: Small tweaks to git-dolt output
2019-07-01 11:46:02 -07:00
2019-03-18 14:22:56 -07:00
2019-03-07 14:27:44 -08:00
2019-01-16 23:31:24 -08:00

Installing the dolt command line

Prerequisites

  • Make sure git is installed
  • Setup ssh keys for github authentication: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
  • Install go: https://golang.org/doc/install
  • run: git config --global --add url."ssh://git@github.com".insteadOf "https://github.com"
  • Clone this repo and pull the latest
    • For compatibility with some tools, it's recommended to clone the repo into a specific directory structure in your go workspace. Specifically, clone source code into $GOPATH/src/github.com/liquidata-inc/. This directory structure should become unnecssary at some point in the future, but is necessary for some tools to work properly. See https://golang.org/doc/code.html#Workspaces for details.
  • Configure your environment with important variables. Put these in your .bash_profile / .bashrc
    • Set your GOPATH environment variable:
      • export GOPATH=`go env GOPATH`
        
      • If your go workspace is somewhere other than the default of ~/go, set GOPATH manually via an export directive in your .bash_profile, e.g. export GOPATH=/workspaces/liquidata/go
    • export NOMS_VERSION_NEXT=1
    • Add the go binary installation directory to your PATH variable (export PATH=$GOPATH/bin:$PATH).
  • This helper function can also be added to make installation easier:
dolt_install() {
  pushd ~/go/src/github.com/liquidata-inc/ld/dolt/go/cmd/dolt
  GO111MODULE=on go install .
  popd
}
  • Windows installation
    • Do whatever windows stuff you gotta do so that %USERPROFILE%/go/bin is part of the path

Installation

  • If you setup dolt_install
    • run: dolt_install
  • If not
    • Open a command line in the dolt/go directory
    • run: GO111MODULE=on go install .

First commands

  • dolt config --global --add user.email YOU@liquidata.co
  • dolt config --global --add user.name "YOUR NAME"

Setting up a repo

  • make a new directory with nothing in it
  • From the new directory run dolt init

Docs

Description
Dolt – Git for Data
Readme Apache-2.0 428 MiB
Latest
2026-02-11 19:22:42 -06:00
Languages
Go 81.8%
Shell 17.2%
JavaScript 0.3%
Java 0.1%
Python 0.1%