{"id":31701819,"url":"https://github.com/getlantern/gost","last_synced_at":"2026-02-28T04:32:54.940Z","repository":{"id":24257746,"uuid":"27651471","full_name":"getlantern/gost","owner":"getlantern","description":"gost is like a vendoring `go get` that uses Git subtrees","archived":false,"fork":false,"pushed_at":"2024-03-07T14:29:54.000Z","size":24,"stargazers_count":30,"open_issues_count":1,"forks_count":9,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-10-08T21:09:05.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlantern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-06T22:36:26.000Z","updated_at":"2025-02-20T09:26:02.000Z","dependencies_parsed_at":"2024-06-20T19:07:52.946Z","dependency_job_id":"3735eb14-27f6-439a-85bf-a04d87a8e937","html_url":"https://github.com/getlantern/gost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getlantern/gost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fgost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fgost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fgost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fgost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlantern","download_url":"https://codeload.github.com/getlantern/gost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fgost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29924735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T21:09:00.348Z","updated_at":"2026-02-28T04:32:54.911Z","avatar_url":"https://github.com/getlantern.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"MWT EDITS\n\ngost\n==========\ngost is like a vendoring `go get` that uses Git subtrees. It is useful for\nproducing repeatable builds and for making coordinated changes across multiple\nGo packages hosted on GitHub.\n\nWhen you `gost get`, any packages that are hosted on GitHub will be sucked in as\nsubrepositories and any other packages will be included in source form.\n\nUnlike most vendoring mechanisms, gost is not meant to be used within a\nsubfolder of an existing repo. Rather, to use gost, set up a new project (which\nwe call a \"gost repo\") in order to do your vendoring in there.\n\nA gost repo is a self-contained, versioned Go workspace, with its own src, pkg\nand bin folders. In fact, you can think of gost as nothing more than a way of\nversioning Go workspaces.\n\n### Example\n\n#### Setting up a new gost repo\n\nLet's say that we want to make a change to github.com/getlantern/flashlight that\nrequires changes to various libraries in github.com/getlantern that are used by\nflashlight.\n\n##### Install gost\n\n```\ngo get github.com/getlantern/gost\n```\n\n##### Initialize a gost repo\n\nDo this outside of your existing Go workspace(s).\n\n```\nmkdir flashlight-build\ncd flashlight-build\ngost init\n```\n\n##### Set the gost repo directory as your GOPATH\n\ngost init creates a setenv.bash that sets your GOPATH and PATH to point at your\ngost repo.\n\n```\nsource ./setenv.bash\n```\n\n##### Gost get the main project that we're interested in\n\n```\ngost get github.com/getlantern/flashlight master\n```\n\nNote that you always have to specify the branch from which you're getting code.\n\nAt this point, we have a gost repo that incorporates flashlight and all of\nits dependencies (including test dependencies). We may want to go ahead and\npush upstream now.\n\n```\ngit remote add origin https://github.com/getlantern/flashlight-build.git\ngit push -u origin master\n```\n\n##### Branch from master in preparation for making our changes\n\n```\ngit checkout -b mybranch master\n```\n\nNow we make our changes.\n\n##### Pull in another existing package\n\nLet's say that there's an existing package on GitHub that we need to add to our\nGOPATH in order to make this change. We can just `gost get` it.\n\n```\ngost get github.com/getlantern/newneededpackage master\n```\n\n##### Pull in upstream updates\n\nIf updates have been made upstream, we can pull these in using `gost get -u`.\nIt works just like `go get -u` and updates the target package and dependencies.\n\n```\ngost get -u github.com/getlantern/flashlight\n```\n\nIf you want to update only the named package and leave depedencies as-is, use\nthe `up` flag.\n\n```\ngost get -up github.com/getlantern/flashlight\n```\n\n##### Push our gost get project and submit a PR\n\n```\ngit push --set-upstream origin mybranch\n```\n\nAt this point, we can submit a pull request on GitHub, which will show all\nchanges to all projects in our gost repo (i.e. our GOPATH). Once the PR has\nbeen merged to master, we can pull using git as usual.\n\n##### Contribute changes back upstream\n\n```\ngit checkout master\ngit pull\ngost push -u github.com/getlantern/flashlight master\n```\n\nUnlike `gost get` which fetches dependencies, `gost push` only pushes the\nspecific package indicated in the command.\n\nNote again that you have to specify the branch to which you want to push.\n\nThe `-u` flag tells gost to first pull from upstream before pushing. You can\nomit it if you don't want to do this, but if you have upstream changes that\naren't in your local repo, the push will fail.\n\nYou can also push to multiple repos in one step. For example, to push all\npackages in github.com/getlantern:\n\n```\ngost push github.com/getlantern master\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fgost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlantern%2Fgost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fgost/lists"}