Git is really a magic tool. Today it took an hour to solve the problem of synchronization of this branch, and it has also improved a lot in understanding of the branch.
"Git GC" is a good command, which can be optimized and run without any problems.
The error message is as follows:
Git push origin xxxx
....
[Remote Rejected] XXXX-> XXXX <no such ref>
.....
After checking SOF and other places, you cannot solve your own problems. Instead, you can only try gitref.org A Little Bit. Of course, the backup database is required.
I found that it was really fast to understand and learn while trying. Many git concepts are clear and I have read a lot of documents, but I don't have a ref.
All right, everyone knows the ref = reference. In fact, this concept is normal, because it is a pointer or a reference, and the written understanding is that the pointer does not exist. Is it damaged by me, all the fixes have failed.
I had to delete and re-create and re-Synchronize. The reason why I didn't dare to do this at the beginning is that there is always a kind of synchronization concept in my mind. Imagine if I deleted remote data and synchronized it, my local files will not be deleted.
Git push -- delete origin XXXX // Yes, push has the ability to delete and create remote branches. Branch is a disability.
Git push origin XXXX // push up, of course this XXXX branch will be automatically created
Git Branch -- Set-upstream VIP-1st origin/VIP-1st // associate a local branch to a remote
Git pull // used to check the results, which can be left empty
Haha, it's really good ~