Solve the problem of prompt “failed to sync branch” when using Git

When an empty git project is created and a large number of local files are copied in, and you want to do any git operation, you will be reported
as soon as possible

failed to sync this branch
You might need to open a shell and debug the state of this repo.

Maybe you’ll follow the instructions

debug xxx

But it doesn’t work

The actual reason is that there is no initialization

Do it in the current directory

git init

It’s OK

Read More: