<commit_before>gost
==========
gost is like a vendoring `go get` that uses Git subtrees. It is useful for
producing repeatable builds and for making coordinated changes across multiple
Go packages hosted on GitHub.

When you `gost get`, any packages that are hosted on GitHub will be sucked in as
subrepositories and any other packages will be included in source form.

Unlike most vendoring mechanisms, gost is not meant to be used within a
subfolder of an existing repo. Rather, to use gost, set up a new project (which
we call a "gost repo") in order to do your vendoring in there.

### Example

#### Setting up a new gost repo

Let's say that we want to make a change to github.com/getlantern/flashlight that
requires changes to various libraries in github.com/getlantern that are used by
flashlight.

##### Install gost

```
go get github.com/getlantern/gost
```

##### Initialize a gost repo

```
mkdir flashlight-build
cd flashlight-build
gost init
```

##### Set the gost repo directory as your GOPATH

gost init creates a setenv.bash that sets your GOPATH and PATH.

```
source ./setenv.bash
```

##### Gost get the main project that we're interested in

```
gost get github.com/getlantern.org/flashlight master
```

Note that you always have to specify the branch from which you're getting code.

At this point, we have a gost repo that incorporates flashlight and all of
its dependencies (including test dependencies). We may want to go ahead and
push upstream now.

```
git remote add origin https://github.com/getlantern/flashlight-build.git<commit_msg>fix flashlight repo url in README.md<commit_after>gost
==========
gost is like a vendoring `go get` that uses Git subtrees. It is useful for
producing repeatable builds and for making coordinated changes across multiple
Go packages hosted on GitHub.

When you `gost get`, any packages that are hosted on GitHub will be sucked in as
subrepositories and any other packages will be included in source form.

Unlike most vendoring mechanisms, gost is not meant to be used within a
subfolder of an existing repo. Rather, to use gost, set up a new project (which
we call a "gost repo") in order to do your vendoring in there.

### Example

#### Setting up a new gost repo

Let's say that we want to make a change to github.com/getlantern/flashlight that
requires changes to various libraries in github.com/getlantern that are used by
flashlight.

##### Install gost

```
go get github.com/getlantern/gost
```

##### Initialize a gost repo

```
mkdir flashlight-build
cd flashlight-build
gost init
```

##### Set the gost repo directory as your GOPATH

gost init creates a setenv.bash that sets your GOPATH and PATH.

```
source ./setenv.bash
```

##### Gost get the main project that we're interested in

```
gost get github.com/getlantern/flashlight master
```

Note that you always have to specify the branch from which you're getting code.

At this point, we have a gost repo that incorporates flashlight and all of
its dependencies (including test dependencies). We may want to go ahead and
push upstream now.

```
git remote add origin https://github.com/getlantern/flashlight-build.git
{'fraction_non_alphanumeric': 0.07680101555061886, 'fraction_numerical': 0.0, 'mean_word_length': 4.306397306397306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2509822', 'n_tokens_mistral': 926, 'n_tokens_neox': 851, 'n_words': 458}