When developing patches for WordPress core—and to do development generally—using Git provides the best experience. WordPress core however uses SVN (for the moment) as the canonical source for writing changes back to WordPress. We can get the best of both worlds by checking out SVN inside of a Git clone, and then update both SVN and Git at the same time when pulling changes. An additional benefit here is that when adding the project directory to a code editor, you don't have to mess with it returning duplicate results for files that exist both in SVN and Git.
To update Git and SVN concurrently, do lando svn-git-up. To switch to a specific branch and update, do lando svn-git-up 4.9. Leave the branch designation empty to switch and update master/trunk.
When developing patches for WordPress core—and to do development generally—using Git provides the best experience. WordPress core however uses SVN (for the moment) as the canonical source for writing changes back to WordPress. We can get the best of both worlds by checking out SVN inside of a Git clone, and then update both SVN and Git at the same time when pulling changes. An additional benefit here is that when adding the project directory to a code editor, you don't have to mess with it returning duplicate results for files that exist both in SVN and Git.
This approach has also been done by @danielbachhuber: https://danielbachhuber.com/2012/09/30/git-in-my-subversion/
To update Git and SVN concurrently, do
lando svn-git-up
. To switch to a specific branch and update, dolando svn-git-up 4.9
. Leave the branch designation empty to switch and updatemaster
/trunk
.