2

I'm currently working with a workflow that makes use of Wordpress as a submodule under git. My workflow involves adding a submodule to my project from the following URL:

git://github.com/WordPress/WordPress.git 

The problem:

Doing this seems to grab the most up-to-date Wordpress version, including the non-stable alpha versions.

I simply want to grab the most recent stable release, and I'm wondering whether there is some specific syntax I can add to the git URL above that allows me to specify a specific branch perhaps?

Thanks

1
  • 1
    This is not WP specific and mainly opinion based. For a list of tags use git tag -l and to clone a specific tag use git checkout tags/your-targeted-tag. Obviously you're always cloning the full repo, but the branch or tag you use is what you're searching for. Commented Nov 20, 2013 at 16:45

1 Answer 1

0

To my knowledge it is not possible to generically clone/checkout the latest stable version with either git or svn.

In either case you have to identify the specific tag (version) you want to pull from with git or svn. Or, as you've done, just pull trunk (which is the development branch)

For more see: https://codex.wordpress.org/Using_Subversion

3
  • This is absurd. Why isn't there just a "latest" branch? I know it's WordPress, but come on... Commented Jun 20 at 4:32
  • It’s git. There is no such thing as a “stable branch tag”. Some projects may treat main as stable (react for ex), but that’s hardly the norm (Linux main is dev for example). OP could have worked around it with scripting to identify the latest stable (highest numbered tag) and pull that… but seemed OOS for the answer. Commented Jul 3 at 0:14
  • On the contrary. It is extremely common practice for authors/maintainers to manage a "latest" tag that is associated with the current stable release of their software titles. It has nothing to do with git specifically. Commented Jul 7 at 6:29

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.