The git error "fatal: Not a valid object name master" shows that the local repository has no branch named "master". That branch is important as it is the main branch name for git and some git commands depend on it, e.g. the one that fails in your case.
This is despite you fetched all the remote references (incl. the branches and especially the remote master branch) because all remote branches are prefixed with remote/<remote-name>/<remote-branch-name> in the local repository.
To fetch the remote master branch as the local master branch to create it locally as well, use git fetch:
git fetch origin master:master
Do this before the git command that previously failed and it should work.
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events