git push和git pull

git push

  git push如果直接使用,不加repository和refspec,那么首先根据当前branch的branch name,在配置文件中找到branch.branchName.remote(没有就是origin),然后push 所有的local-tracking branch(即有对应的remote-tracking branch)到remote repository。那些完全是本地repository branch上的commit是不会被git push命令上传到remote repository的。

git pull

  git pull如果直接使用,不加repository和refspec,那么首先根据当前的branch name,在配置文件中找到branch.branchaName.remote,然后根据remote name在配置文件中找到remote.remoteName.fetch作为refspc。

原文地址:https://www.cnblogs.com/chaoguo1234/p/5352254.html