Local repository associated with remote repository:
First remove case other remote link to take up the git remote rm origin associated your remote warehouse git remote add origin http://192.168.xx.xxx:8080/tfs/DefaultCollection/xxxCopy the code
Create the local Develop branch and associate the remote Develop branch
Git checkout -b develop origin/develop this command will associate the local develop branch with the specified remote Develop branch. git branch develop git checkout develop git pull origin developCopy the code
Git pull origin develop = ‘git pull origin develop’
refusing to merge unrelated histories
The main reason for this problem is that the local and remote warehouses are actually separate warehouses. If you clone the remote repository locally, you will not have this problem
You can run the following command to resolve the problem:
$git pull Origin Develop -- allow-suggested - HISTORIES This option can merge the histories of two separate startup repositoriesCopy the code
And then you can push normally.