I am learning git from book, but I struggle with some problems. I have to manually clone jquery repo. Below there are my commands.
git init
git remote add origin https://github.com/jquery/jquery.git
git fetch --no-tags origin main:refs/remotes/origin/main
I don't fully understand if it that fetch command is correct. jQuery has branch main
, but after that I type following command:
git branch --set-upstream-to master origin/main
I get the following error:
fatal: branch 'origin/main' does not exist.
I don't understand why is that. How to set upstream from my local master branch to the main branch in the remote repo of jQuery?
My git version: git version 2.35.1.windows.2