Home > Back-end >  Git clone would not directly copy the local warehouse synchronization code?
Git clone would not directly copy the local warehouse synchronization code?

Time:04-24

When I meet a problem, clone project network problems, the project manager then copy the one for me, then I forget to modify the git user, led to the code after the submission is the project manager to enter the password, and the clone is not the main branch, is a branch of call phase2, I perform the last step in the git push origin phase2, this command should mean synchronization code to phase2 branch? But this line to the project manager's password, don't perform, so I want to use your own user clone a remote, then from now to complete the code is copied to the new clone to submit again, found that the results from the new clone remote warehouse code is not synchronized, I have the code, the code should not in my local staging area? Git has this function? Direct copy is not synchronized when clone? But I go to the remote warehouse page look, didn't I submit records, so how can I put this code synchronization to the remote branch?

CodePudding user response:

Settled, oneself with 4 hours; Make a conclusion: 1. The git clone could really will copy the local repository hasn't git push the code, I haven't the strength to parse the git source code, just guess; 2: although git clone will commit themselves to not push the code also clone down, but don't seem to be associated with remote warehouse to do, when I solve this problem after the git pull screen output again the code; 3. The git log is not face to face with the meaning of check record, his record by the remote warehouse synchronous record and submit to the local warehouse merge together [if you commit but not push, so your computer local git log will show submission record, but if other computers on the git log will not show, unless you git push after]; 4: if you have I encountered this kind of situation, to directly. The git \ config file modification remote warehouse url of the user name that I changed after push let me enter your password again, synchronization succeeded;;;;; The last is the remote warehouse and local repository are consistent
  • Related