Easier way to update submodules in git
I love using git submodules to keep common code in a single place. Unfortunately, updating a submodule reference to the lastest revision is a chore.
I love using git submodules to keep common code in a single place. Unfortunately, updating a submodule reference to the lastest revision is a chore.
A while ago I started using Mark Jaquith’s gitified WordPress for contributing to Core.
The trouble is that the patches generated by git diff aren’t exactly the same as the ones generated by svn. I’ve tried several cooky solutions until I found this one.
I keep reading the phrase “Git isn’t better than Subversion, it’s just different”. I’m sure a few years ago people said “SVN isn’t better than CVS, it’s just different”. Anyway, here’s one key aspect that shows how primitive svn is.
I like writing WordPress plugins and I like using git to version-control them. Problem is that wordpress.org uses svn. Even worse, I like to use git submodules, so git-svn is no help. What to do? Write a shell script, of course.
So I’ve been accepted as a GSoC student for WordPress. My project involves working on the core WordPress code, but on a separate svn repository. I needed an easy way to keep my branch synchronized with trunk.
Unfortunately, svn doesn’t have the concept of rebasing, so I wrote a little bash script to simulate it.