GIT: create a new local branch and track a remote branch

Warning: this only works in GIT version >= 2.23

In older versions of GIT when you wanted to create a new local branch a track changes from a remote branch (say develop), you would have to use two commands:

Since GIT 2.23 you can use a single command to achieve the same:

git switch -c new-branch –track origin/develop