Say, I have a fork of some library ver. 1.1 under git. Then a new tar-ball ver. 1.2 comes out. How can I update my forked library to a new version?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You question isn’t great, but I’ll offer a potential solution.
Lets assume the code base for the library looks like this:
you fork at
bwhich is the1.1release.Now assuming development continues on the
vendortree.and
dbecomes their1.2release. If thevendortree is in a git repo and you can access it, then agit pullor maybe agit pull --rebasefrom thevendortree should do most things you need, you may need to resolve some conflicts etc. However if thevendortree is not in git, and the only access you have the source code is tarballs of each release then something slightly more complicated might be required.So I would create a second branch at the point at which you forked, by doing:
Then untar you v1.2 tarbar into this branch and commit the changes. You should now have something like this:
Now, either you can merge the changes from branch v1.2 using:
Or you can rebase your changes on top of v1.2 using:
Which will give you:
I’m no expert, so I’m sure people will comment if I’ve made some mistakes (please do, then I’ll add corrections).