After git clones the remote repository to the local, create the dev branch of the remote origin to the local, and report an error.

I looked for it on the Internet and said that I could use git fetch, first, but it still didn"t work.

Git
Aug.27,2021

try this: https://blog.csdn.net/weichua.

git fetch origin
git checkout -b dev
git reset --hard origin/dev
git push -u origin dev
The reason for

is that there is no dev branch on the remote.


is there an index.lock file in the .git directory? delete


try: first create a local dev branch and overwrite it in pull
git clone XXX.git
git checkout dev
git pull origin dev

Menu