Hello,
we are running Mediawiki with some small modifications (e.g. the Vector.php skin).
My plan was to checkout a specific branch (e.g. 1.21.1). Then I committed some local modifications to the code. The local repo is now ahead of e.g. 1 commit of origin. Minor version upgrades (1.21.2) can be merged without any trouble.
My question is now, how an major upgrade (1.21 to 1.22) preserving my local commits can be accomplished using GIT. The only way I found so far was using cherry-pick to transfer the local commits to the new branch.
Any ideas?
The MW guide recommends to make a fresh clone and copy the config file, images... http://www.mediawiki.org/wiki/Manual:Upgrading#Using_Git
Thank you, Christoph
git pull -r
-Chad On Mar 12, 2014 6:33 AM, "Christoph Mitasch" cmitasch@thomas-krenn.com wrote:
Hello,
we are running Mediawiki with some small modifications (e.g. the Vector.php skin).
My plan was to checkout a specific branch (e.g. 1.21.1). Then I committed some local modifications to the code. The local repo is now ahead of e.g. 1 commit of origin. Minor version upgrades (1.21.2) can be merged without any trouble.
My question is now, how an major upgrade (1.21 to 1.22) preserving my local commits can be accomplished using GIT. The only way I found so far was using cherry-pick to transfer the local commits to the new branch.
Any ideas?
The MW guide recommends to make a fresh clone and copy the config file, images... http://www.mediawiki.org/wiki/Manual:Upgrading#Using_Git
Thank you, Christoph
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hello Chad,
thanks for your advice. Unfortunately it didn't do the trick for me.
Here is what I tried:
$ git checkout -t remotes/origin/REL1_20 Branch REL1_20 set up to track remote branch REL1_20 from origin. Switched to a new branch 'REL1_20' $ echo test >> README $ git commit -a [REL1_20 2f1da84] testing 1 file changed, 1 insertion(+) $ git checkout -t remotes/origin/REL1_21 Branch REL1_21 set up to track remote branch REL1_21 from origin. Switched to a new branch 'REL1_21' $ git pull -r Current branch REL1_21 is up to date. $ cat README | grep test Many thanks to the Wikimedia regulars for testing and suggestions. $ git merge REL1_20 Auto-merging thumb.php CONFLICT (content): Merge conflict in thumb.php Auto-merging tests/qunit/suites/resources/mediawiki/mediawiki.test.js CONFLICT (content): Merge conflict in tests/qunit/suites/resources/mediawiki/mediawiki.test.js ...
Thank you, Christoph
----- Ursprüngliche Mail -----
Von: "Chad" innocentkiller@gmail.com An: "MediaWiki announcements and site admin list" mediawiki-l@lists.wikimedia.org Gesendet: Mittwoch, 12. März 2014 15:23:58 Betreff: Re: [MediaWiki-l] Mediawiki Upgrade using GIT
git pull -r
-Chad On Mar 12, 2014 6:33 AM, "Christoph Mitasch" cmitasch@thomas-krenn.com wrote:
Hello,
we are running Mediawiki with some small modifications (e.g. the Vector.php skin).
My plan was to checkout a specific branch (e.g. 1.21.1). Then I committed some local modifications to the code. The local repo is now ahead of e.g. 1 commit of origin. Minor version upgrades (1.21.2) can be merged without any trouble.
My question is now, how an major upgrade (1.21 to 1.22) preserving my local commits can be accomplished using GIT. The only way I found so far was using cherry-pick to transfer the local commits to the new branch.
Any ideas?
The MW guide recommends to make a fresh clone and copy the config file, images... http://www.mediawiki.org/wiki/Manual:Upgrading#Using_Git
Thank you, Christoph
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 12/03/14 14:32, Christoph Mitasch wrote:
we are running Mediawiki with some small modifications (e.g. the Vector.php skin).
My plan was to checkout a specific branch (e.g. 1.21.1). Then I committed some local modifications to the code. The local repo is now ahead of e.g. 1 commit of origin. Minor version upgrades (1.21.2) can be merged without any trouble.
My question is now, how an major upgrade (1.21 to 1.22) preserving my local commits can be accomplished using GIT. The only way I found so far was using cherry-pick to transfer the local commits to the new branch.
Hello
What's wrong with cherry-pick ?
otherwise it seems rebase can do this as well, but I never tested
(see https://stackoverflow.com/questions/2474353/how-to-copy-commits-from-one-bra... for examples)
considering your example:
$ git checkout -t remotes/origin/REL1_20 $ echo test >> README $ git commit -a [REL1_20 2f1da84] testing 1 file changed, 1 insertion(+) $ git checkout -t remotes/origin/REL1_21 $ git cherry-pick 2f1da84
(of course, depending on your modifications, there might be conflict, in which case you solve them and add/commit the fixes)
Alexis
mediawiki-l@lists.wikimedia.org