git branch -a shows the version git is tracking at the very top of the display/listing that scrolls. Like so:
git branch -a
* MOODLE_311_STABLE
master
remotes/origin/HEAD -> origin/master
* above indicates the branch tracked.
In order to use git on the moodle code the hidden .git directory and hidden .gitother files need be present:
.gitattributes
.gitignore
.github
and the .git directory which looks like this on Linux server:
.git:
total 2520
drwxr-xr-x. 2 root root 4096 Jun 5 2021 branches
-rw-r--r--. 1 root root 340 Jun 5 2021 config
-rw-r--r--. 1 root root 73 Jun 5 2021 description
-rw-r--r--. 1 root root 3339 Mar 30 09:06 FETCH_HEAD
-rw-r--r--. 1 root root 34 Jun 5 2021 HEAD
drwxr-xr-x. 2 root root 4096 Jun 5 2021 hooks
-rw-r--r--. 1 root root 2486872 Mar 30 09:06 index
drwxr-xr-x. 2 root root 4096 Jun 5 2021 info
drwxr-xr-x. 3 root root 4096 Jun 5 2021 logs
drwxr-xr-x. 4 root root 4096 Jun 5 2021 objects
-rw-r--r--. 1 root root 41 Mar 30 09:06 ORIG_HEAD
-rw-r--r--. 1 root root 42318 Jun 5 2021 packed-refs
drwxr-xr-x. 5 root root 4096 Jun 5 2021 refs
'SoS', Ken