TIPS - How to clone one branch only with git 2.21.0

How to clone one branch only with git 2.21.0

How to clone one branch only with git 2.21.0 ?
For example to clone the 4.0-dev of the joomla-cms repository into the joomla4x directory

git clone https://github.com/joomla/joomla-cms/ --branch '4.0-dev' --depth 1 joomla4x

I tried other techniques on the web without success. Apparently the order of parameters and simple quotes matter to make it work. Cheer up!

Alexandre ELISÉ

#Joomla technical problem solver. Focusing on secure coding and defensive cybersecurity #appsec #blueteam.#coderparlerpartager Now working @aproximito.

Get the newsletter

Super Joomlers! Get the most out of Joomla!
We hate spam as much as you do and we will not send you email without your prior consent. You can unsubscribe / resubscribe any time you want.