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。

posted @ 2016-04-04 16:23  chaoguo1234  阅读(1057)  评论(0编辑  收藏  举报