Giter VIP home page Giter VIP logo

git-third-party's Introduction

git-third-party

Manage vendored third-party code in git.

In monorepo software projects, it is common to check in code from third-party dependencies into the monorepo (called “vendoring”). This allows the developers of the monorepo to patch the third-party code directly without having to get a change merged upstream.

Managing these vendored projects will often involve cherry-picking upstream commits to fix bugs or exporting patches from the monorepo for use upstream. git-third-party helps with this by allowing cherry-picking commits in separate git repos, optionally adding or removing directory prefixes.

example

Say you want to vendor the foobar library (from the v1.0 tag) in your git monorepo:

$ cd ~/src/monorepo
$ git third-party clone --squash -s ~/src/foobar -d third_party/foobar v1.0
$ git add third_party/foobar && git commit -m 'foobar: check in v1.0'

After some development, you find a bug and fix it locally in the monorepo. Later, when you want to upstream the fix:

$ cd ~/src/foobar
$ git third-party cherry-pick -s ~/src/monorepo -S third_party/foobar -1 <commit hash>

Then create a pull request with the new commit.

Eventually, foobar v1.1 is released with bugfixes that you want to pull in locally:

$ cd ~/src/monorepo
$ git third-party cherry-pick -s ~/src/foobar -d third_party/foobar v1.1...v1.0

git-third-party's People

Contributors

velentr avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.