Giter VIP home page Giter VIP logo

Comments (5)

richardeaxon avatar richardeaxon commented on May 17, 2024 1

There are a couple of ways to do this (see here https://stackoverflow.com/questions/6022302/how-to-apply-unmerged-upstream-pull-requests-from-other-forks-into-my-fork).

Lets say I want to target almende/vis pull #4280 and merge it into the new vis-network. I could do

git pull https://github.com/almende/vis refs/pull/4280/head

which sucks the entire pull request across but generates masses of merge conflicts due to the structural changes of the new vis-network.

I can also cherry-pick which works just fine for a a single commit like in this pull request. Just wack in the commit ID in almende/vis and git/github figures things out automagically. No merge conflicts and the correct attribution and log messages come across as per the original commit.

git cherry-pick 9726da595bd1fcb4c5c7264a53fed28f02d69a55

I am not sure how to handle bigger pulls with multiple commits. Can cherry-pick do that?

from vis-network.

richardeaxon avatar richardeaxon commented on May 17, 2024 1

And from here (https://stackoverflow.com/questions/1670970/how-to-cherry-pick-multiple-commits) you can cherry-pick ranges.

git cherry-pick 88b1c05abafcd0aa51e89ba417cd4cbc42a2ae60..4c604a38818c96ae252ed2cbd50143f4092a341b

I did notice that I still had to import the entire remote pull request to load all the refs before I could cherry-pick. So my procedure was:

# for a single commit in the pull
git pull https://github.com/almende/vis refs/pull/4280/head
git merge --abort
git cherry-pick 9726da595bd1fcb4c5c7264a53fed28f02d69a55 

# or for a range of commits in a pull
git pull https://github.com/almende/vis refs/pull/4205/head
git merge --abort
git cherry-pick 88b1c05abafcd0aa51e89ba417cd4cbc42a2ae60..4c604a38818c96ae252ed2cbd50143f4092a341b

The second example has merge conflicts which would need fixing.

This still requires some manual work and analysis of each pull request to see where it belongs and if it is still valid.

from vis-network.

mojoaxel avatar mojoaxel commented on May 17, 2024 1

I followed this and was successfull. Here is an example:

git remote add visjs-network https://github.com/visjs-community/visjs-network.git
git fetch visjs-network
git checkout -b fix-cluster-open-missing-edge-labels
git cherry-pick 89c8ee285a320097b52371e760d6bc41200dbae7
...

from vis-network.

mojoaxel avatar mojoaxel commented on May 17, 2024

@richardeaxon Thanks! Feel free to provide some useful pull-requests 😉

from vis-network.

mojoaxel avatar mojoaxel commented on May 17, 2024

🎉 [email protected] is now feature-compatible with [email protected] 🚀

from vis-network.

Related Issues (20)

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.