Whilst trying to make some changes to a GitHub project, using an Ubuntu box, I hit an interesting issue with git switch - namely that it doesn't work
So I'm running Ubuntu 18.04.6 LTS: -
lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
and had created a new branch: -
git branch
* develop
and then tried to switch to it: -
git switch test_doc_update
but instead got: -
git: 'switch' is not a git command. See 'git --help'.
I checked the version of Git: -
git --version
git version 2.17.1
and even tried upgrading it: -
apt-get update && apt-get upgrade -y git
...
git git-man
2 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
...
but to no avail: -
git --version
git version 2.17.1
Instead, as per this Git: ‘switch’ is not a git command. See ‘git –help’ I used this instead: -
git checkout test_doc_update
Switched to branch 'test_doc_update'
git branch
develop
No comments:
Post a Comment