Patch forked repo with git -
say, have fork of library ver. 1.1 under git. new tar-ball ver. 1.2 comes out. how can update forked library new version?
you question isn't great, i'll offer potential solution.
lets assume code base library looks this:
vendor -- b
you fork @ b
1.1
release.
vendor -- b \ \ 1 -- 2 -- 3
now assuming development continues on vendor
tree.
vendor -- b -- c -- d \ \ (master) 1 -- 2 -- 3
and d
becomes 1.2
release. if vendor
tree in git repo , can access it, git pull
or maybe git pull --rebase
vendor
tree should things need, may need resolve conflicts etc. if vendor
tree not in git, , access have source code tarballs of each release more complicated might required.
so create second branch @ point @ forked, doing:
$ git checkout -b v1.2 b
then untar v1.2 tarbar branch , commit changes. should have this:
vendor -- b -- c -- d |\ | \ (master) | 1 -- 2 -- 3 \ (v1.2 branch) x
now, either can merge changes branch v1.2 using:
$ git checkout master $ git merge v1.2
or can rebase changes on top of v1.2 using:
$ git rebase v1.2
which give you:
vendor -- b -- c -- d \ \ (master) x -- d -- 1 -- 2 -- 3
i'm no expert, i'm sure people comment if i've made mistakes (please do, i'll add corrections).
Comments
Post a Comment