git - Is the local repository (with files already in it) associated with the remote repository?
某草草
某草草 2017-05-02 09:44:15
0
6
760

1. The local warehouse already has files

2. How to pull the content from the associated remote library to the local warehouse

I know, if you have a remote library first, you can use git clone
If the local warehouse is empty there is nothing you can use git pull to pull things from the remote library Come to your local warehouse

Now I have a warehouse with files associated with a remote library. How can I pull the contents of the remote library to the local place?
When I use git pull origin master:master, I will get the following error

某草草
某草草

reply all(6)
伊谢尔伦

If there is a conflict, you can git fetch origin master,然后处理冲突文件,处理完后 add-commit-push this set first.

Ty80

The two libraries do not have a common ancestral history and cannot be simply merged.
You need to think about which library you want to extract the submission records from and apply them to another library.

漂亮男人

My suggestion is to clone the remote warehouse first, and then copy the local warehouse directly into it. Although this method is not very elegant, it can still solve the problem well. In addition, it is best not to add any files when initializing the remote warehouse, as this will make subsequent work more difficult.

为情所困

Firstgit fetchgit pull will automatically merge, fetch will not, then resolve the code conflict and then merge

为情所困

First pull an empty folder, then replace your existing files in push

仅有的幸福

You can submit local code first and then use git pull origin master, resolve conflicts and then git commit and then git push origin push

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template